41 #ifndef _STRINGTOKENIZER_H_ 42 #define _STRINGTOKENIZER_H_ 48 #include "../Exceptions.h" 79 StringTokenizer(
const std::string& s,
const std::string& delimiters =
" \t\n\f\r",
bool solid =
false,
bool allowEmptyTokens =
false);
141 #endif //_STRINGTOKENIZER_H_ virtual ~StringTokenizer()
This class allows to perform a correspondence analysis.
bool hasMoreToken() const
Tell if some tokens are still available.
const std::string & nextToken()
Get the next available token. If no token is availbale, throw an Exception.
const std::string & getToken(size_t pos) const
Get a particular token.
size_t numberOfRemainingTokens() const
Tell how many tokens are available.
void removeEmptyTokens()
remove all empty token from the current position.
std::deque< std::string > tokens_
Where the tokens are stored.
const std::deque< std::string > & getTokens() const
Retrieve all tokens.
std::string unparseRemainingTokens() const
std::deque< std::string > splits_
size_t currentPosition_
the current position in the token list.