ost::StringTokenizer::iterator - The input forward iterator for tokens.
Contents
Constructor & Destructor Documentation
ost::StringTokenizer::iterator::iterator()[inline]virtualost::StringTokenizer::iterator::~iterator()[inline],[virtual]ost::StringTokenizer::iterator::iterator(constiterator&i)[inline]
copy constructor.
Detailed Description
The input forward iterator for tokens.
Author
Henner Zeller
Member Function Documentation
charost::StringTokenizer::iterator::nextDelimiter()const[inline]
returns the next delimiter after the current token or '\0', if there are no following delimiters. It
returns the very next delimiter (even if skipAllDelim=true).
boolost::StringTokenizer::iterator::operator!=(constiterator&other)const[inline]
compares to other iterator. Usually used to compare against the end() iterator.
constchar*ost::StringTokenizer::iterator::operator*()
returns the immutable string this iterator points to or '0' if no token is available (i.e. i == end()).
Do not store pointers to this token, since it is invalidated for each iteration. If you need the token,
copy it (e.g. with strdup());
iterator&ost::StringTokenizer::iterator::operator++()
shifts this iterator to the next token in the string.
iterator&ost::StringTokenizer::iterator::operator=(constiterator&i)[inline]
assignment operator.
boolost::StringTokenizer::iterator::operator==(constiterator&other)const[inline]
compares to other iterator. Usually used to compare against the end() iterator.
Name
ost::StringTokenizer::iterator - The input forward iterator for tokens.
Synopsis
#include <tokenizer.h>
PublicMemberFunctionsiterator ()
virtual ~iterator ()
iterator (const iterator &i)
copy constructor.
iterator & operator= (const iterator &i)
assignment operator.
iterator & operator++ () THROWS(NoSuchElementException)
shifts this iterator to the next token in the string.
const char * operator* () THROWS(NoSuchElementException)
returns the immutable string this iterator points to or '0' if no token is available (i.e.
char nextDelimiter () const
returns the next delimiter after the current token or ' ', if there are no following delimiters.
bool operator== (const iterator &other) const
compares to other iterator.
bool operator!= (const iterator &other) const
compares to other iterator.
Friends
class StringTokenizer