Lines Matching defs:c16
35 static inline constexpr bool is_high_surrogate(char16_t c16) {
36 return c16 >= 0xd800 && c16 < 0xdc00;
39 static inline constexpr bool is_low_surrogate(char16_t c16) {
40 return c16 >= 0xdc00 && c16 < 0xe000;
43 size_t c16rtomb(char* s, char16_t c16, mbstate_t* ps) {
47 if (is_high_surrogate(c16)) {
48 char32_t c32 = (c16 & ~0xd800) << 10;
52 } else if (is_low_surrogate(c16)) {
55 return c32rtomb(s, static_cast<char32_t>(c16), state);
58 if (!is_low_surrogate(c16)) {
64 (c16 & ~0xdc00)) + 0x10000;