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

typedef void U_CALLCONV UCharIteratorSetState(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode)

Function type declaration for UCharIterator.setState().

Restore the "state" of the iterator using a state word from a getState() call. The iterator object need not be the same one as for which getState() was called, but it must be of the same type (set up using the same uiter_setXYZ function) and it must iterate over the same string (binary identical regardless of memory address). For more about the state word see UCharIteratorGetState.

After calling setState(), a getIndex(UITER_CURRENT) may be slow because the UTF-16 index may not be restored as well, but the iterator can deliver the correct text contents and move relative to the current position without performance degradation.

iter the UCharIterator structure ("this pointer")
state the state word from a getState() call on a same-type, same-string iterator
pErrorCode Must be a valid pointer to an error code value, which must not indicate a failure before the function call.
See also:

UCharIteratorGetState ICU 2.6

Definition at line 307 of file uiter.h.

Generated by  Doxygen 1.6.0   Back to index