MCPcopy Create free account
hub / github.com/crashfort/SourceDemoRender / FromUTF8

Method FromUTF8

Projects/Shared/Source/String.cpp:21–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21std::wstring SDR::String::FromUTF8(const std::string& input)
22{
23 std::wstring ret;
24
25 auto size = MultiByteToWideChar(CP_UTF8, 0, input.data(), input.size(), nullptr, 0);
26 ret.resize(size, 0);
27
28 MultiByteToWideChar(CP_UTF8, 0, input.data(), input.size(), &ret.front(), size);
29
30 return ret;
31}
32
33std::wstring SDR::String::FromUTF8(const char* input)
34{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected