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

#define U16_NEXT (   s,
{ \
    (c)=(s)[(i)++]; \
    if(U16_IS_LEAD(c)) { \
        uint16_t __c2; \
        if((i)<(length) && U16_IS_TRAIL(__c2=(s)[(i)])) { \
            ++(i); \
            (c)=U16_GET_SUPPLEMENTARY((c), __c2); \
        } \
    } \

Get a code point from a string at a code point boundary offset, and advance the offset to the next code point boundary. (Post-incrementing forward iteration.) "Safe" macro, handles unpaired surrogates and checks for string boundaries.

The offset may point to the lead surrogate unit for a supplementary code point, in which case the macro will read the following trail surrogate as well. If the offset points to a trail surrogate or to a single, unpaired lead surrogate, then that itself will be returned as the code point.

sconst UChar * string
istring offset, must be i<length
lengthstring length
coutput UChar32 variable
See also:

Definition at line 261 of file utf16.h.

Referenced by UnicodeSet::_toPattern(), GetBiDiClass::call(), RegexMatcher::find(), SubCharIter::first32(), NormalizationTransliterator::handleTransliterate(), NamePrepTransform::map(), SubCharIter::next32(), SubCharIter::next32PostInc(), NamePrepTransform::process(), SpoofImpl::scriptScan(), UnicodeSet::span(), UnicodeString::trim(), ucnv_getNextUChar(), ucol_getUnsafeSet(), uspoof_check(), uspoof_getSkeleton(), and usprep_prepare().

Generated by  Doxygen 1.6.0   Back to index