class iterator

The input forward iterator for tokens. More...

Full nameost::StringTokenizer::iterator
Definition#include <misc.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

The input forward iterator for tokens.

 iterator ()

iterator

 ~iterator ()

~iterator

[virtual]

 iterator (const iterator& i)

iterator

copy constructor.

iterator & operator = (const iterator &i)

operator =

assignment operator.

iterator & operator ++ ()
throw(NoSuchElementException)

operator ++

shifts this iterator to the next token in the string.

const char*  operator * ()
throw(NoSuchElementException)

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());

inline char  nextDelimiter ()

nextDelimiter

[const]

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).

inline bool  operator == (const iterator &other)

operator ==

[const]

compares to other iterator. Usually used to compare against the end() iterator.

inline bool  operator != (const iterator &other)

operator !=

[const]

compares to other iterator. Usually used to compare against the end() iterator.