Home | History | Annotate | Download | only in core

Lines Matching refs:utf8

154 int SkUTF8_CountUnichars(const char utf8[]) {
155 SkASSERT(utf8);
160 int c = *(const uint8_t*)utf8;
164 utf8 += SkUTF8_LeadByteToCount(c);
170 int SkUTF8_CountUnichars(const char utf8[], size_t byteLength) {
171 SkASSERT(NULL != utf8 || 0 == byteLength);
174 const char* stop = utf8 + byteLength;
176 while (utf8 < stop) {
177 utf8 += SkUTF8_LeadByteToCount(*(const uint8_t*)utf8);
183 SkUnichar SkUTF8_ToUnichar(const char utf8[]) {
184 SkASSERT(NULL != utf8);
186 const uint8_t* p = (const uint8_t*)utf8;
241 size_t SkUTF8_FromUnichar(SkUnichar uni, char utf8[]) {
248 if (utf8) {
249 *utf8 = (char)uni;
266 if (utf8) {
268 utf8 += count;
270 *--utf8 = *p++;
272 *--utf8 = (char)(~(0xFF >> count) | uni);
275 SkASSERT(utf8 == NULL || orig == SkUTF8_ToUnichar(utf8));
374 char utf8[]) {
385 if (utf8 == NULL) { // just count
390 char* start = utf8;
392 utf8 += SkUTF8_FromUnichar(SkUTF16_NextUnichar(&utf16), utf8);
394 size = utf8 - start;