• Home
  • Raw
  • Download

Lines Matching refs:utf8

179 int SkUTF8_CountUnichars(const char utf8[]) {  in SkUTF8_CountUnichars()  argument
180 SkASSERT(utf8); in SkUTF8_CountUnichars()
185 int c = *(const uint8_t*)utf8; in SkUTF8_CountUnichars()
189 utf8 += SkUTF8_LeadByteToCount(c); in SkUTF8_CountUnichars()
195 int SkUTF8_CountUnichars(const char utf8[], size_t byteLength) { in SkUTF8_CountUnichars() argument
196 SkASSERT(utf8 || 0 == byteLength); in SkUTF8_CountUnichars()
199 const char* stop = utf8 + byteLength; in SkUTF8_CountUnichars()
201 while (utf8 < stop) { in SkUTF8_CountUnichars()
202 utf8 += SkUTF8_LeadByteToCount(*(const uint8_t*)utf8); in SkUTF8_CountUnichars()
208 SkUnichar SkUTF8_ToUnichar(const char utf8[]) { in SkUTF8_ToUnichar() argument
209 SkASSERT(utf8); in SkUTF8_ToUnichar()
211 const uint8_t* p = (const uint8_t*)utf8; in SkUTF8_ToUnichar()
266 size_t SkUTF8_FromUnichar(SkUnichar uni, char utf8[]) { in SkUTF8_FromUnichar() argument
273 if (utf8) { in SkUTF8_FromUnichar()
274 *utf8 = (char)uni; in SkUTF8_FromUnichar()
291 if (utf8) { in SkUTF8_FromUnichar()
293 utf8 += count; in SkUTF8_FromUnichar()
295 *--utf8 = *p++; in SkUTF8_FromUnichar()
297 *--utf8 = (char)(~(0xFF >> count) | uni); in SkUTF8_FromUnichar()
300 SkASSERT(utf8 == NULL || orig == SkUTF8_ToUnichar(utf8)); in SkUTF8_FromUnichar()
399 char utf8[]) { in SkUTF16_ToUTF8() argument
410 if (utf8 == NULL) { // just count in SkUTF16_ToUTF8()
415 char* start = utf8; in SkUTF16_ToUTF8()
417 utf8 += SkUTF8_FromUnichar(SkUTF16_NextUnichar(&utf16), utf8); in SkUTF16_ToUTF8()
419 size = utf8 - start; in SkUTF16_ToUTF8()