Lines Matching refs:utf8
48 int SkUTF::CountUTF8(const char* utf8, size_t byteLength) {
49 if (!utf8) {
53 const char* stop = utf8 + byteLength;
54 while (utf8 < stop) {
55 int type = utf8_byte_type(*(const uint8_t*)utf8);
56 if (!utf8_type_is_valid_leading_byte(type) || utf8 + type > stop) {
60 ++utf8;
61 if (!utf8_byte_is_continuation(*(const uint8_t*)utf8)) {
65 ++utf8;
210 size_t SkUTF::ToUTF8(SkUnichar uni, char utf8[SkUTF::kMaxBytesInUTF8Sequence]) {
215 if (utf8) {
216 *utf8 = (char)uni;
228 if (utf8) {
230 utf8 += count;
232 *--utf8 = *p++;
234 *--utf8 = (char)(~(0xFF >> count) | uni);
301 char utf8[SkUTF::kMaxBytesInUTF8Sequence];
302 size_t count = ToUTF8(uni, utf8);
309 const char* elems = utf8;