158 const std::string& separators ) {
159 std::vector<std::string> result_vector;
160 std::string::size_type start_p, end_p;
161 start_p =
text.find_first_not_of( separators );
162 while ( start_p != std::string::npos )
164 end_p =
text.find_first_of( separators, start_p );
165 if ( end_p == std::string::npos ) { end_p =
text.length(); }
166 const std::string sub_str =
text.substr( start_p, end_p - start_p );
167 result_vector.push_back( sub_str );
168 start_p =
text.find_first_not_of( separators, end_p );
170 return result_vector;