Lines Matching defs:pair
36 * Convert mutf8 sequence to utf16 pair and return pair: [utf16 code point, mutf8 size].
44 auto [pair, nbytes] = ConvertMUtf8ToUtf16Pair(mutf8, mutf8Len - pos);
48 res += pair > MAX_U16 ? CONST_2 : 1;
55 std::pair<uint32_t, size_t> ConvertMUtf8ToUtf16Pair(const uint8_t* data, size_t maxBytes)
86 uint32_t pair = 0;
87 pair |= ((codePoint >> (PAIR_ELEMENT_WIDTH - DATA_WIDTH)) + U16_LEAD) & MASK_16BIT;
88 pair <<= PAIR_ELEMENT_WIDTH;
89 pair |= (codePoint & MASK_10BIT) + U16_TAIL;
91 return { pair, CONST_4 };
100 auto [pair, nbytes] = ConvertMUtf8ToUtf16Pair(mutf8In, mutf8Len - inPos);
101 auto [pHi, pLo] = SplitUtf16Pair(pair);
169 // A valid surrogate pair should always start with a High Surrogate
183 // A valid surrogate pair, decode normally
187 // A unicode not fallen into the range of representing by surrogate pair, return as it is