Searched defs:U8_PREV_OR_FFFD (Results 1 - 6 of 6) sorted by relevance
/third_party/icu/icu4c/source/i18n/ |
H A D | utf8collationiterator.cpp | 248 U_ASSERT(pos < normalized.length()); UChar trail; if(U16_IS_TRAIL(trail = normalized[pos])) { ++pos; } return trail; } UBool FCDUTF8CollationIterator::foundNULTerminator() { if(state == CHECK_FWD && length < 0) { length = --pos; return true; } else { return false; } } UChar32 FCDUTF8CollationIterator::nextCodePoint(UErrorCode &errorCode) { UChar32 c; for(;;) { if(state == CHECK_FWD) { if(pos == length || ((c = u8[pos]) == 0 && length < 0)) { return U_SENTINEL; } if(U8_IS_SINGLE(c)) { ++pos; return c; } U8_NEXT_OR_FFFD(u8, pos, length, c); if(CollationFCD::hasTccc(c <= 0xffff ? c : U16_LEAD(c)) && (CollationFCD::maybeTibetanCompositeVowel(c) || (pos != length && nextHasLccc()))) { pos -= U8_LENGTH(c); if(!nextSegment(errorCode)) { return U_SENTINEL; } continue; } return c; } else if(state == IN_FCD_SEGMENT && pos != limit) { U8_NEXT_OR_FFFD(u8, pos, length, c); return c; } else if(state == IN_NORMALIZED && pos != normalized.length()) { c = normalized.char32At(pos); pos += U16_LENGTH(c); return c; } else { switchToForward(); } } } UChar32 FCDUTF8CollationIterator::previousCodePoint(UErrorCode &errorCode) { UChar32 c; for(;;) { if(state == CHECK_BWD) { if(pos == 0) { return U_SENTINEL; } if(U8_IS_SINGLE(c = u8[pos - 1])) { --pos; return c; } U8_PREV_OR_FFFD(u8, 0, pos, c); if(CollationFCD::hasLccc(c <= 0xffff ? c : U16_LEAD(c)) && (CollationFCD::maybeTibetanCompositeVowel(c) || (pos != 0 && previousHasTccc()))) { pos += U8_LENGTH(c); if(!previousSegment(errorCode)) { return U_SENTINEL; } continue; } return c; } else if(state == IN_FCD_SEGMENT && pos != start) { U8_PREV_OR_FFFD(u8, 0, pos, c); return c; } else if(state >= IN_NORMALIZED && pos != 0) { c = normalized.char32At(pos - 1); pos -= U16_LENGTH(c); return c; } else { switchToBackward(); } } } void FCDUTF8CollationIterator::forwardNumCodePoints(int32_t num, UErrorCode &errorCode) { while(num > 0 && FCDUTF8CollationIterator::nextCodePoint(errorCode) >= 0) { --num; } } void FCDUTF8CollationIterator::backwardNumCodePoints(int32_t num, UErrorCode &errorCode) { while(num > 0 && FCDUTF8CollationIterator::previousCodePoint(errorCode) >= 0) handleGetTrailSurrogate() argument
|
/third_party/icu/icu4c/source/common/unicode/ |
H A D | utf8.h | 757 #define U8_PREV_OR_FFFD(s, start, i, c) UPRV_BLOCK_MACRO_BEGIN { \ macro
|
/third_party/node/deps/icu-small/source/common/unicode/ |
H A D | utf8.h | 757 #define U8_PREV_OR_FFFD(s, start, i, c) UPRV_BLOCK_MACRO_BEGIN { \ macro
|
/third_party/node/deps/icu-small/source/i18n/ |
H A D | utf8collationiterator.cpp | 248 U_ASSERT(pos < normalized.length()); char16_t trail; if(U16_IS_TRAIL(trail = normalized[pos])) { ++pos; } return trail; } UBool FCDUTF8CollationIterator::foundNULTerminator() { if(state == CHECK_FWD && length < 0) { length = --pos; return true; } else { return false; } } UChar32 FCDUTF8CollationIterator::nextCodePoint(UErrorCode &errorCode) { UChar32 c; for(;;) { if(state == CHECK_FWD) { if(pos == length || ((c = u8[pos]) == 0 && length < 0)) { return U_SENTINEL; } if(U8_IS_SINGLE(c)) { ++pos; return c; } U8_NEXT_OR_FFFD(u8, pos, length, c); if(CollationFCD::hasTccc(c <= 0xffff ? c : U16_LEAD(c)) && (CollationFCD::maybeTibetanCompositeVowel(c) || (pos != length && nextHasLccc()))) { pos -= U8_LENGTH(c); if(!nextSegment(errorCode)) { return U_SENTINEL; } continue; } return c; } else if(state == IN_FCD_SEGMENT && pos != limit) { U8_NEXT_OR_FFFD(u8, pos, length, c); return c; } else if(state == IN_NORMALIZED && pos != normalized.length()) { c = normalized.char32At(pos); pos += U16_LENGTH(c); return c; } else { switchToForward(); } } } UChar32 FCDUTF8CollationIterator::previousCodePoint(UErrorCode &errorCode) { UChar32 c; for(;;) { if(state == CHECK_BWD) { if(pos == 0) { return U_SENTINEL; } if(U8_IS_SINGLE(c = u8[pos - 1])) { --pos; return c; } U8_PREV_OR_FFFD(u8, 0, pos, c); if(CollationFCD::hasLccc(c <= 0xffff ? c : U16_LEAD(c)) && (CollationFCD::maybeTibetanCompositeVowel(c) || (pos != 0 && previousHasTccc()))) { pos += U8_LENGTH(c); if(!previousSegment(errorCode)) { return U_SENTINEL; } continue; } return c; } else if(state == IN_FCD_SEGMENT && pos != start) { U8_PREV_OR_FFFD(u8, 0, pos, c); return c; } else if(state >= IN_NORMALIZED && pos != 0) { c = normalized.char32At(pos - 1); pos -= U16_LENGTH(c); return c; } else { switchToBackward(); } } } void FCDUTF8CollationIterator::forwardNumCodePoints(int32_t num, UErrorCode &errorCode) { while(num > 0 && FCDUTF8CollationIterator::nextCodePoint(errorCode) >= 0) { --num; } } void FCDUTF8CollationIterator::backwardNumCodePoints(int32_t num, UErrorCode &errorCode) { while(num > 0 && FCDUTF8CollationIterator::previousCodePoint(errorCode) >= 0) handleGetTrailSurrogate() argument
|
/third_party/skia/third_party/externals/icu/source/i18n/ |
H A D | utf8collationiterator.cpp | 248 U_ASSERT(pos < normalized.length()); UChar trail; if(U16_IS_TRAIL(trail = normalized[pos])) { ++pos; } return trail; } UBool FCDUTF8CollationIterator::foundNULTerminator() { if(state == CHECK_FWD && length < 0) { length = --pos; return TRUE; } else { return FALSE; } } UChar32 FCDUTF8CollationIterator::nextCodePoint(UErrorCode &errorCode) { UChar32 c; for(;;) { if(state == CHECK_FWD) { if(pos == length || ((c = u8[pos]) == 0 && length < 0)) { return U_SENTINEL; } if(U8_IS_SINGLE(c)) { ++pos; return c; } U8_NEXT_OR_FFFD(u8, pos, length, c); if(CollationFCD::hasTccc(c <= 0xffff ? c : U16_LEAD(c)) && (CollationFCD::maybeTibetanCompositeVowel(c) || (pos != length && nextHasLccc()))) { pos -= U8_LENGTH(c); if(!nextSegment(errorCode)) { return U_SENTINEL; } continue; } return c; } else if(state == IN_FCD_SEGMENT && pos != limit) { U8_NEXT_OR_FFFD(u8, pos, length, c); return c; } else if(state == IN_NORMALIZED && pos != normalized.length()) { c = normalized.char32At(pos); pos += U16_LENGTH(c); return c; } else { switchToForward(); } } } UChar32 FCDUTF8CollationIterator::previousCodePoint(UErrorCode &errorCode) { UChar32 c; for(;;) { if(state == CHECK_BWD) { if(pos == 0) { return U_SENTINEL; } if(U8_IS_SINGLE(c = u8[pos - 1])) { --pos; return c; } U8_PREV_OR_FFFD(u8, 0, pos, c); if(CollationFCD::hasLccc(c <= 0xffff ? c : U16_LEAD(c)) && (CollationFCD::maybeTibetanCompositeVowel(c) || (pos != 0 && previousHasTccc()))) { pos += U8_LENGTH(c); if(!previousSegment(errorCode)) { return U_SENTINEL; } continue; } return c; } else if(state == IN_FCD_SEGMENT && pos != start) { U8_PREV_OR_FFFD(u8, 0, pos, c); return c; } else if(state >= IN_NORMALIZED && pos != 0) { c = normalized.char32At(pos - 1); pos -= U16_LENGTH(c); return c; } else { switchToBackward(); } } } void FCDUTF8CollationIterator::forwardNumCodePoints(int32_t num, UErrorCode &errorCode) { while(num > 0 && FCDUTF8CollationIterator::nextCodePoint(errorCode) >= 0) { --num; } } void FCDUTF8CollationIterator::backwardNumCodePoints(int32_t num, UErrorCode &errorCode) { while(num > 0 && FCDUTF8CollationIterator::previousCodePoint(errorCode) >= 0) handleGetTrailSurrogate() argument
|
/third_party/skia/third_party/externals/icu/source/common/unicode/ |
H A D | utf8.h | 757 #define U8_PREV_OR_FFFD(s, start, i, c) UPRV_BLOCK_MACRO_BEGIN { \ macro
|
Completed in 10 milliseconds