• Home
  • Raw
  • Download

Lines Matching refs:src

160 int32_t utf32_from_utf8_at(const char *src, size_t src_len, size_t index, size_t *next_index)  in utf32_from_utf8_at()  argument
170 int32_t ret = utf32_at_internal(src + index, &num_read); in utf32_from_utf8_at()
178 ssize_t utf32_to_utf8_length(const char32_t *src, size_t src_len) in utf32_to_utf8_length() argument
180 if (src == nullptr || src_len == 0) { in utf32_to_utf8_length()
185 const char32_t *end = src + src_len; in utf32_to_utf8_length()
186 while (src < end) { in utf32_to_utf8_length()
187 size_t char_len = utf32_codepoint_utf8_length(*src++); in utf32_to_utf8_length()
200 void utf32_to_utf8(const char32_t* src, size_t src_len, char* dst, size_t dst_len) in utf32_to_utf8() argument
202 if (src == nullptr || src_len == 0 || dst == nullptr) { in utf32_to_utf8()
206 const char32_t *cur_utf32 = src; in utf32_to_utf8()
207 const char32_t *end_utf32 = src + src_len; in utf32_to_utf8()
257 char16_t *strcpy16(char16_t *dst, const char16_t *src) in strcpy16() argument
260 const char16_t *p = src; in strcpy16()
291 char16_t* strstr16(const char16_t* src, const char16_t* target) in strstr16() argument
294 if (needle == '\0') return (char16_t*)src; in strstr16()
299 if (*src == '\0') { in strstr16()
302 } while (*src++ != needle); in strstr16()
303 } while (strncmp16(src, target, target_len) != 0); in strstr16()
304 src--; in strstr16()
306 return (char16_t*)src; in strstr16()
328 void utf16_to_utf8(const char16_t* src, size_t src_len, char* dst, size_t dst_len) in utf16_to_utf8() argument
330 if (src == nullptr || src_len == 0 || dst == nullptr) { in utf16_to_utf8()
334 const char16_t* cur_utf16 = src; in utf16_to_utf8()
335 const char16_t* const end_utf16 = src + src_len; in utf16_to_utf8()
362 ssize_t utf8_length(const char *src) in utf8_length() argument
364 const char *cur = src; in utf8_length()
405 ssize_t utf16_to_utf8_length(const char16_t *src, size_t src_len) in utf16_to_utf8_length() argument
407 if (src == nullptr || src_len == 0) { in utf16_to_utf8_length()
412 const char16_t* const end = src + src_len; in utf16_to_utf8_length()
413 while (src < end) { in utf16_to_utf8_length()
415 if ((*src & 0xFC00) == 0xD800 && (src + 1) < end in utf16_to_utf8_length()
416 && (*(src + 1) & 0xFC00) == 0xDC00) { in utf16_to_utf8_length()
419 src += 2; in utf16_to_utf8_length()
421 char_len = utf32_codepoint_utf8_length((char32_t)*src++); in utf16_to_utf8_length()
455 size_t utf8_to_utf32_length(const char *src, size_t src_len) in utf8_to_utf32_length() argument
457 if (src == nullptr || src_len == 0) { in utf8_to_utf32_length()
464 for (cur = src, end = src + src_len, num_to_skip = 1; in utf8_to_utf32_length()
480 void utf8_to_utf32(const char* src, size_t src_len, char32_t* dst) in utf8_to_utf32() argument
482 if (src == nullptr || src_len == 0 || dst == nullptr) { in utf8_to_utf32()
486 const char* cur = src; in utf8_to_utf32()
487 const char* const end = src + src_len; in utf8_to_utf32()
497 static inline uint32_t utf8_to_utf32_codepoint(const uint8_t *src, size_t length) in utf8_to_utf32_codepoint() argument
504 return src[0]; in utf8_to_utf32_codepoint()
506 unicode = src[0] & 0x1f; in utf8_to_utf32_codepoint()
507 utf8_shift_and_mask(&unicode, src[1]); in utf8_to_utf32_codepoint()
510 unicode = src[0] & 0x0f; in utf8_to_utf32_codepoint()
511 utf8_shift_and_mask(&unicode, src[1]); in utf8_to_utf32_codepoint()
512 utf8_shift_and_mask(&unicode, src[2]); in utf8_to_utf32_codepoint()
515 unicode = src[0] & 0x07; in utf8_to_utf32_codepoint()
516 utf8_shift_and_mask(&unicode, src[1]); in utf8_to_utf32_codepoint()
517 utf8_shift_and_mask(&unicode, src[2]); in utf8_to_utf32_codepoint()
518 utf8_shift_and_mask(&unicode, src[3]); in utf8_to_utf32_codepoint()
576 const uint8_t* src, size_t srcLen, char16_t* dst, size_t dstLen) { in utf8_to_utf16_no_null_terminator() argument
582 const uint8_t* const u8end = src + srcLen; in utf8_to_utf16_no_null_terminator()
583 const uint8_t* u8cur = src; in utf8_to_utf16_no_null_terminator()