Home | History | Annotate | Download | only in core

Lines Matching refs:utf8

165 int SkUTF8_CountUnichars(const char utf8[]) {
166 SkASSERT(utf8);
171 int c = *(const uint8_t*)utf8;
175 utf8 += SkUTF8_LeadByteToCount(c);
181 int SkUTF8_CountUnichars(const char utf8[], size_t byteLength) {
182 SkASSERT(NULL != utf8 || 0 == byteLength);
185 const char* stop = utf8 + byteLength;
187 while (utf8 < stop) {
188 utf8 += SkUTF8_LeadByteToCount(*(const uint8_t*)utf8);
194 SkUnichar SkUTF8_ToUnichar(const char utf8[]) {
195 SkASSERT(NULL != utf8);
197 const uint8_t* p = (const uint8_t*)utf8;
252 size_t SkUTF8_FromUnichar(SkUnichar uni, char utf8[]) {
259 if (utf8) {
260 *utf8 = (char)uni;
277 if (utf8) {
279 utf8 += count;
281 *--utf8 = *p++;
283 *--utf8 = (char)(~(0xFF >> count) | uni);
286 SkASSERT(utf8 == NULL || orig == SkUTF8_ToUnichar(utf8));
385 char utf8[]) {
396 if (utf8 == NULL) { // just count
401 char* start = utf8;
403 utf8 += SkUTF8_FromUnichar(SkUTF16_NextUnichar(&utf16), utf8);
405 size = utf8 - start;