MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / utf8_to_wchar

Method utf8_to_wchar

src/runner/cli_wide.cpp:69–76  ·  view source on GitHub ↗

\brief Convert UTF-8 to wide char

Source from the content-addressed store, hash-verified

67
68/// \brief Convert UTF-8 to wide char
69std::wstring CLIWide::utf8_to_wchar(const std::string& str) {
70 if (str.empty()) return std::wstring();
71
72 int size_needed = MultiByteToWideChar(CP_UTF8, 0, &str[0], (int)str.size(), NULL, 0);
73 std::wstring wstrTo(size_needed, 0);
74 MultiByteToWideChar(CP_UTF8, 0, &str[0], (int)str.size(), &wstrTo[0], size_needed);
75 return wstrTo;
76}
77
78/// \brief Read console input with timeout
79bool CLIWide::read_console_input(INPUT_RECORD& inputRecord) {

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected