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

UChar UCharCharacterIterator::setIndex ( int32_t  position) [virtual]

Sets the iterator to refer to the "position"-th code unit in the text-storage object the iterator refers to, and returns that code unit.

positionthe position within the text-storage object
the code unit ICU 2.0

Implements CharacterIterator.

Definition at line 125 of file uchriter.cpp.

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

Referenced by CharIterTest::TestConstructionAndEqualityUChariter(), and CharIterTest::TestIteration().

    if(position < begin) {
        pos = begin;
    } else if(position > end) {
        pos = end;
    } else {
        pos = position;
    if(pos < end) {
        return text[pos];
    } else {
        return DONE;

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index