/* *********************************************************************** * Class: StringTokenizer * * By Arash Partow - 2000 * * URL: http://www.partow.net/programming/stringtokenizer/index.html * * * * Copyright Notice: * * Free use of this library is permitted under the guidelines and * * in accordance with the most current version of the Common Public * * License. * * http://www.opensource.org/licenses/cpl.php * * * *********************************************************************** */ #ifndef INCLUDE_STRINGTOKENIZER_H #define INCLUDE_STRINGTOKENIZER_H #include #include #include #include namespace csr { class StringTokenizer { public: StringTokenizer(const std::string& _str, const std::string& _delim); ~StringTokenizer(){}; int countTokens(); bool hasMoreTokens(); std::string nextToken(); int nextIntToken(); double nextFloatToken(); std::string nextToken(const std::string& delim); std::string remainingString(); std::string filterNextToken(const std::string& filterStr); private: std::string token_str; std::string delim; }; } // namespace csr { #endif