MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / utf8ToWideChar

Function utf8ToWideChar

CodeFormatCore/src/Config/LuaEditorConfig.cpp:12–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#ifdef WIN32
11#include <Windows.h>
12std::wstring utf8ToWideChar(const std::string &utf8Str) {
13 int wideCharSize = MultiByteToWideChar(CP_UTF8, 0, utf8Str.c_str(), -1, NULL, 0);
14 std::wstring wideStr(wideCharSize, L'\0');
15 MultiByteToWideChar(CP_UTF8, 0, utf8Str.c_str(), -1, &wideStr[0], wideCharSize);
16 return wideStr;
17}
18#endif
19
20std::shared_ptr<LuaEditorConfig> LuaEditorConfig::OpenFile(const std::string &path) {

Callers 1

OpenFileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected