Title: Android Unicode 字符串 Date: 2019-05-24 13:05:38 Modified: 2019-05-24 13:05:38 Category: Android Tags: Android, Unicode Slug: android-unicode-string
相关源码
String16
// http://androidxref.com/6.0.1_r10/xref/system/core/libutils/String16.cpp#allocFromUTF8
static char16_t* allocFromUTF8(const char* u8str, size_t u8len)
{
const ssize_t u16len = utf8_to_utf16_length(u8cur, u8len);
utf8_to_utf16(u8cur, u8len, u16str);
}
namespace android{
//! This is a string holding UTF-16 characters.
class String16{
private:
const char16_t* mString;
}
}