]> Creatis software - bbtk.git/blob - kernel/src/bbtkUtilities.cxx
968853ff91b111f59a100382974cf1cb42f9eacb
[bbtk.git] / kernel / src / bbtkUtilities.cxx
1 #include "bbtkUtilities.h"
2
3
4 namespace bbtk
5 {
6
7
8 bool Utilities::loosematch(std::string stdLine,std::string stdOptions) 
9 {
10         bool result=false;
11           std::vector<std::string> tokens;
12           SplitString ( stdOptions,"|", tokens);
13           int i,size=tokens.size();  
14           for (i=0; i<size; i++)
15           {               
16 #ifdef WIN32
17                   if ( strcmpi(stdLine.c_str(),tokens[i].c_str())==0) 
18                   { 
19                           result=true; 
20                   }               
21 #else
22                   if ( strcasecmp(stdLine.c_str(),tokens[i].c_str())==0) 
23                   { 
24                           result=true; 
25                   }               
26 #endif
27
28           }
29           return result;
30 }
31
32
33
34 }