Lines Matching refs:utf8
47 int SkUTF::CountUTF8(const char* utf8, size_t byteLength) { in CountUTF8() argument
48 if (!utf8) { in CountUTF8()
52 const char* stop = utf8 + byteLength; in CountUTF8()
53 while (utf8 < stop) { in CountUTF8()
54 int type = utf8_byte_type(*(const uint8_t*)utf8); in CountUTF8()
55 if (!utf8_type_is_valid_leading_byte(type) || utf8 + type > stop) { in CountUTF8()
59 ++utf8; in CountUTF8()
60 if (!utf8_byte_is_continuation(*(const uint8_t*)utf8)) { in CountUTF8()
64 ++utf8; in CountUTF8()
209 size_t SkUTF::ToUTF8(SkUnichar uni, char utf8[SkUTF::kMaxBytesInUTF8Sequence]) { in ToUTF8()
214 if (utf8) { in ToUTF8()
215 *utf8 = (char)uni; in ToUTF8()
227 if (utf8) { in ToUTF8()
229 utf8 += count; in ToUTF8()
231 *--utf8 = *p++; in ToUTF8()
233 *--utf8 = (char)(~(0xFF >> count) | uni); in ToUTF8()