Home | History | Annotate | Download | only in core

Lines Matching refs:utf8

46  * @returns -1  iff invalid UTF8 byte,
47 * 0 iff UTF8 continuation byte,
68 int SkUTF8_CountUnichars(const char utf8[]) {
69 SkASSERT(utf8);
74 int c = *(const uint8_t*)utf8;
78 utf8 += SkUTF8_LeadByteToCount(c);
87 const char* utf8 = static_cast<const char*>(text);
93 const char* stop = utf8 + byteLength;
95 while (utf8 < stop) {
96 int type = utf8_byte_type(*(const uint8_t*)utf8);
98 if (!utf8_type_is_valid_leading_byte(type) || utf8 + type > stop) {
103 ++utf8;
104 if (!utf8_byte_is_continuation(*(const uint8_t*)utf8)) {
108 ++utf8;
114 SkUnichar SkUTF8_ToUnichar(const char utf8[]) {
115 SkASSERT(utf8);
117 const uint8_t* p = (const uint8_t*)utf8;
205 size_t SkUTF8_FromUnichar(SkUnichar uni, char utf8[]) {
212 if (utf8) {
213 *utf8 = (char)uni;
230 if (utf8) {
232 utf8 += count;
234 *--utf8 = *p++;
236 *--utf8 = (char)(~(0xFF >> count) | uni);
239 SkASSERT(utf8 == nullptr || orig == SkUTF8_ToUnichar(utf8));
350 char utf8[]) {
361 if (utf8 == nullptr) { // just count
366 char* start = utf8;
368 utf8 += SkUTF8_FromUnichar(SkUTF16_NextUnichar(&utf16), utf8);
370 size = utf8 - start;