MCPcopy Create free account
hub / github.com/assimp/assimp / Utf8ToWide

Function Utf8ToWide

code/Common/DefaultIOSystem.cpp:66–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64const std::wstring wdummy;
65
66static std::wstring Utf8ToWide(const char *in) {
67 if (nullptr == in) {
68 return wdummy;
69 }
70 int size = MultiByteToWideChar(CP_UTF8, 0, in, -1, nullptr, 0);
71 // size includes terminating null; std::wstring adds null automatically
72 std::wstring out(static_cast<size_t>(size) - 1, L'\0');
73 MultiByteToWideChar(CP_UTF8, 0, in, -1, &out[0], size);
74
75 return out;
76}
77
78const std::string dummy;
79

Callers 3

ExistsMethod · 0.85
OpenMethod · 0.85
MakeAbsolutePathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected