This is used only from debugger and test code.
| 81 | |
| 82 | // This is used only from debugger and test code. |
| 83 | void 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 | |
| 96 | void ConvertModifiedUtf8ToUtf16(uint16_t* utf16_data_out, size_t out_chars, |
| 97 | const char* utf8_data_in, size_t in_bytes) { |
nothing calls this directly
no test coverage detected