Logo Search packages:      
Sourcecode: icu version File versions  Download package

UChar UCharCharacterIterator::next ( void   )  [virtual]

Advances to the next code unit in the iteration range (toward endIndex()), and returns that code unit. If there are no more code units to return, returns DONE.

Returns:
the next code unit in the iteration range. ICU 2.0

Implements CharacterIterator.

Definition at line 149 of file uchriter.cpp.

References CharacterIterator::end, CharacterIterator::pos, and text.

Referenced by CharIterTest::TestIteration().

                             {
    if (pos + 1 < end) {
        return text[++pos];
    } else {
        /* make current() return DONE */
        pos = end;
        return DONE;
    }
}


Generated by  Doxygen 1.6.0   Back to index