Lines Matching full:utf8
21 /** @returns -1 iff invalid UTF8 byte,
22 0 iff UTF8 continuation byte,
48 int SkUTF::CountUTF8(const char* utf8, size_t byteLength) { in CountUTF8() argument
49 if (!utf8) { in CountUTF8()
53 const char* stop = utf8 + byteLength; in CountUTF8()
54 while (utf8 < stop) { in CountUTF8()
55 int type = utf8_byte_type(*(const uint8_t*)utf8); in CountUTF8()
56 if (!utf8_type_is_valid_leading_byte(type) || utf8 + type > stop) { in CountUTF8()
60 ++utf8; in CountUTF8()
61 if (!utf8_byte_is_continuation(*(const uint8_t*)utf8)) { in CountUTF8()
65 ++utf8; in CountUTF8()
210 size_t SkUTF::ToUTF8(SkUnichar uni, char utf8[SkUTF::kMaxBytesInUTF8Sequence]) { in ToUTF8()
215 if (utf8) { in ToUTF8()
216 *utf8 = (char)uni; in ToUTF8()
228 if (utf8) { in ToUTF8()
230 utf8 += count; in ToUTF8()
232 *--utf8 = *p++; in ToUTF8()
234 *--utf8 = (char)(~(0xFF >> count) | uni); in ToUTF8()
301 char utf8[SkUTF::kMaxBytesInUTF8Sequence]; in UTF16ToUTF8() local
302 size_t count = ToUTF8(uni, utf8); in UTF16ToUTF8()
309 const char* elems = utf8; in UTF16ToUTF8()