相关源码

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;
}
}
Grape

Grape

Graduated in Computer Science and Engineering, but currently working with GNU/Linux infrastructure and in the spare time I'm an Open Source programmer (Python and C), a drawer and author in the YINGJUE Blog.


Comments