---
name: "StringTokenizer_iterator"
section: "3cc"
platform: "linux"
package: "libcommoncpp2-dev"
version: "1.0.13-5"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/StringTokenizer_iterator"
---

# StringTokenizer\_iterator(3cc)

The input forward iterator for tokens.

## NAME

StringTokenizer::iterator - The input forward iterator for tokens.

## SYNOPSIS

`#include <misc.h>`

### Public Methods

**iterator** ()\
 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 '\\0', 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**\

## DETAILED DESCRIPTION

The input forward iterator for tokens.

**Author:**  Henner Zeller

## CONSTRUCTOR & DESTRUCTOR DOCUMENTATION

### StringTokenizer::iterator::iterator ()` [inline]`

### virtual StringTokenizer::iterator::~iterator ()` [inline, virtual]`

### StringTokenizer::iterator::iterator (const iterator & i)` [inline]`

copy constructor.

## MEMBER FUNCTION DOCUMENTATION

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

### const char\* 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());

### bool StringTokenizer::iterator::operator!= (const iterator & other) const` [inline]`

compares to other iterator.

Usually used to compare against the **end()** iterator.

### iterator& StringTokenizer::iterator::operator++ ()

shifts this iterator to the next token in the string.

### iterator& StringTokenizer::iterator::operator= (const iterator & i)` [inline]`

assignment operator.

### bool StringTokenizer::iterator::operator== (const iterator & other) const` [inline]`

compares to other iterator.

Usually used to compare against the **end()** iterator.

## FRIENDS AND RELATED FUNCTION DOCUMENTATION

### friend class StringTokenizer` [friend]`

## AUTHOR

Generated automatically by Doxygen for CommonC++ from the source code.
