Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

std::vector<std::string> Impala::Core::Trec::TextSearchConnector::tokenize ( const std::string &  input,
const std::string &  delims = " \n" 
) [inline, private]

Definition at line 152 of file TextSearchConnector.h.

Referenced by Query().

00153     {
00154         std::string::size_type lPos = input.find_first_not_of(delims, 0);
00155         std::string::size_type pos = input.find_first_of(delims, lPos);
00156 
00157         std::vector<std::string> tokens;
00158 
00159         while (std::string::npos != pos || std::string::npos != lPos)
00160         {
00161             tokens.push_back(input.substr(lPos, pos-lPos));
00162             lPos = input.find_first_not_of(delims, pos);
00163             pos = input.find_first_of(delims, lPos);
00164         }
00165 
00166         return tokens;
00167     }


Generated on Thu Jan 13 09:21:29 2011 for ImpalaSrc by  doxygen 1.5.1