X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkUtilities.cxx;h=968853ff91b111f59a100382974cf1cb42f9eacb;hb=66a4f54ebee938164be7a0ff849832dd4ae1cd48;hp=6ebbe6152ed020ceeb2303db6b741c9fe08c2c44;hpb=a26195c366a89795288009cf7e20f11afa494970;p=bbtk.git diff --git a/kernel/src/bbtkUtilities.cxx b/kernel/src/bbtkUtilities.cxx index 6ebbe61..968853f 100644 --- a/kernel/src/bbtkUtilities.cxx +++ b/kernel/src/bbtkUtilities.cxx @@ -1,30 +1,34 @@ #include "bbtkUtilities.h" - + 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; + std::vector tokens; + SplitString ( stdOptions,"|", tokens); + int i,size=tokens.size(); + for (i=0; i