#ifndef STR_TOK_H #define STR_TOK_H #include #include namespace icl{ /// String Tokenizer Utility class \ingroup UTILS class StrTok{ public: /// Constructor /** @param s string to be tokenized @param sDelims delimiter string: each character of this string is used as delimiter of s */ StrTok(std::string s, std::string sDelims); /// Returns count of remaining tokens /** @return count of remaining tokens. For each nextToken()-call this count will be decreased by one untill it is 0. */ bool hasMoreTokens() const; /// Returns the next token const std::string &nextToken(); /// returns the number of tokesn unsigned int nTokens() const; /// returns a vector const std::vector &allTokens() const; private: std::vector m_oTokens; unsigned int m_uiPos; }; } #endif