Home | History | Annotate | Download | only in core

Lines Matching refs:utf8

37 int SkUTF8_CountUnichars(const char utf8[]) {
38 SkASSERT(utf8);
43 int c = *(const uint8_t*)utf8;
47 utf8 += SkUTF8_LeadByteToCount(c);
53 int SkUTF8_CountUnichars(const char utf8[], size_t byteLength) {
54 SkASSERT(utf8 || 0 == byteLength);
57 const char* stop = utf8 + byteLength;
59 while (utf8 < stop) {
60 utf8 += SkUTF8_LeadByteToCount(*(const uint8_t*)utf8);
66 SkUnichar SkUTF8_ToUnichar(const char utf8[]) {
67 SkASSERT(utf8);
69 const uint8_t* p = (const uint8_t*)utf8;
124 size_t SkUTF8_FromUnichar(SkUnichar uni, char utf8[]) {
131 if (utf8) {
132 *utf8 = (char)uni;
149 if (utf8) {
151 utf8 += count;
153 *--utf8 = *p++;
155 *--utf8 = (char)(~(0xFF >> count) | uni);
158 SkASSERT(utf8 == nullptr || orig == SkUTF8_ToUnichar(utf8));
257 char utf8[]) {
268 if (utf8 == nullptr) { // just count
273 char* start = utf8;
275 utf8 += SkUTF8_FromUnichar(SkUTF16_NextUnichar(&utf16), utf8);
277 size = utf8 - start;