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

#define UTF_SET_CHAR_START ( s,
start,
 )     U16_SET_CP_START(s, start, i)

Take the random-access index i and adjust it so that it points to the beginning of a code point. The input index points to any code unit of a code point and is moved to point to the first code unit of the same code point. i is never incremented. In other words, if i points to a trail surrogate that is preceded by a matching lead surrogate, then i is decremented. Otherwise it is not modified. This can be used to start an iteration with UTF_NEXT_CHAR() from a random index. Same as UTF16_SET_CHAR_START.

Precondition:
start<=i<length
Postcondition:
start<=i<length
Deprecated:
ICU 2.4. Renamed to U16_SET_CP_START, see utf_old.h.

Definition at line 1113 of file utf_old.h.

Referenced by UCharCharacterIterator::setIndex32().


Generated by  Doxygen 1.6.0   Back to index