Searched refs:u16len (Results 1 – 2 of 2) sorted by relevance
/system/core/libutils/ |
D | String16.cpp | 47 const ssize_t u16len = utf8_to_utf16_length(u8cur, u8len); in allocFromUTF8() local 48 if (u16len < 0) { in allocFromUTF8() 52 SharedBuffer* buf = SharedBuffer::alloc(sizeof(char16_t)*(u16len+1)); in allocFromUTF8() 57 utf8_to_utf16(u8cur, u8len, u16str, ((size_t) u16len) + 1); in allocFromUTF8() 69 static char16_t* allocFromUTF16(const char16_t* u16str, size_t u16len) { in allocFromUTF16() argument 70 if (u16len >= SIZE_MAX / sizeof(char16_t)) { in allocFromUTF16() 75 SharedBuffer* buf = SharedBuffer::alloc((u16len + 1) * sizeof(char16_t)); in allocFromUTF16() 79 memcpy(str, u16str, u16len * sizeof(char16_t)); in allocFromUTF16() 80 str[u16len] = 0; in allocFromUTF16()
|
D | Unicode.cpp | 567 char16_t* utf8_to_utf16(const uint8_t* u8str, size_t u8len, char16_t* u16str, size_t u16len) { in utf8_to_utf16() argument 569 LOG_ALWAYS_FATAL_IF(u16len == 0 || u16len > SSIZE_MAX, "u16len is %zu", u16len); in utf8_to_utf16() 570 char16_t* end = utf8_to_utf16_no_null_terminator(u8str, u8len, u16str, u16len - 1); in utf8_to_utf16()
|