MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / ConvertModifiedUtf8ToUtf16

Function ConvertModifiedUtf8ToUtf16

Bcore/src/main/cpp/dex/utf.cc:83–94  ·  view source on GitHub ↗

This is used only from debugger and test code.

Source from the content-addressed store, hash-verified

81
82// This is used only from debugger and test code.
83void ConvertModifiedUtf8ToUtf16(uint16_t* utf16_data_out, const char* utf8_data_in) {
84 while (*utf8_data_in != '\0') {
85 const uint32_t ch = GetUtf16FromUtf8(&utf8_data_in);
86 const uint16_t leading = GetLeadingUtf16Char(ch);
87 const uint16_t trailing = GetTrailingUtf16Char(ch);
88
89 *utf16_data_out++ = leading;
90 if (trailing != 0) {
91 *utf16_data_out++ = trailing;
92 }
93 }
94}
95
96void ConvertModifiedUtf8ToUtf16(uint16_t* utf16_data_out, size_t out_chars,
97 const char* utf8_data_in, size_t in_bytes) {

Callers

nothing calls this directly

Calls 3

GetUtf16FromUtf8Function · 0.85
GetLeadingUtf16CharFunction · 0.85
GetTrailingUtf16CharFunction · 0.85

Tested by

no test coverage detected