Home | History | Annotate | Download | only in core

Lines Matching refs:utf8

62  * @returns -1  iff invalid UTF8 byte,
63 * 0 iff UTF8 continuation byte,
84 int SkUTF8_CountUnichars(const char utf8[]) {
85 SkASSERT(utf8);
90 int c = *(const uint8_t*)utf8;
94 utf8 += SkUTF8_LeadByteToCount(c);
101 int SkUTF8_CountUnicharsWithError(const char utf8[], size_t byteLength) {
102 SkASSERT(utf8 || 0 == byteLength);
105 const char* stop = utf8 + byteLength;
107 while (utf8 < stop) {
108 int type = utf8_byte_type(*(const uint8_t*)utf8);
111 utf8 + type > stop) { // Sequence extends beyond end.
115 ++utf8;
116 if (!utf8_byte_is_continuation(*(const uint8_t*)utf8)) {
120 ++utf8;
126 SkUnichar SkUTF8_ToUnichar(const char utf8[]) {
127 SkASSERT(utf8);
129 const uint8_t* p = (const uint8_t*)utf8;
217 size_t SkUTF8_FromUnichar(SkUnichar uni, char utf8[]) {
224 if (utf8) {
225 *utf8 = (char)uni;
242 if (utf8) {
244 utf8 += count;
246 *--utf8 = *p++;
248 *--utf8 = (char)(~(0xFF >> count) | uni);
251 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;