namespace bbtk
{
- /*
- //========================================================================
- /// Usefull functions for html generation
- static void replace( std::string& str,
- const std::string& from, const std::string& to )
- {
- using std::string;
- string::size_type pos = str.find( from );
- while ( pos != string::npos )
- {
- // std::cout << "'" << str << "' -> '";
- str.replace( pos, from.size(), to );
- pos = str.find( from, pos+from.size()-1 );
- // std::cout << str << "'"<< std::endl;
- }
- }
- //==========================================================================
- inline void html_format(std::string& str)
- {
- replace( str, "&", "&" );
- replace( str, "<", "<"# );
- replace( str, ">", ">" );
- }
- */
+
+
+bool Utilities::loosematch(std::string stdLine,std::string stdOptions)
+{
+ bool result=false;
+ char charTmp;
+ std::vector<std::string> tokens;
+ SplitString ( stdOptions,"|", tokens);
+ int j,sizeStdLineTmp;
+ int i,size=tokens.size();
+ for (i=0; i<size; i++)
+ {
+ if ( strcasecmp(stdLine.c_str(),tokens[i].c_str())==0)
+ {
+ result=true;
+ }
+ }
+ return result;
+}
+
+
+
}