MCPcopy Create free account
hub / github.com/cxasm/notepad-- / StringToWString

Function StringToWString

src/cceditor/ccnotepad.cpp:82–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80extern bool s_isAdminAuth;
81
82inline std::wstring StringToWString(const std::string& str)
83{
84#if 0
85 int len = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, NULL, 0);
86 wchar_t* wide = new wchar_t[len + 1];
87 memset(wide, '\0', sizeof(wchar_t) * (len + 1));
88 MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, wide, len);
89 std::wstring w_str(wide);
90 delete[] wide;
91 return w_str;
92#endif
93
94 QString temp = QString::fromStdString(str);
95 return temp.toStdWString();
96}
97#endif
98
99

Callers 1

runAsAdminMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected