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

Function string_to_wstring

src/include/utils/wmi_helper.hpp:194–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194inline std::wstring string_to_wstring(const std::string& str) {
195 if (str.empty()) return std::wstring();
196
197 int size_needed = MultiByteToWideChar(CP_UTF8, 0, str.data(), (int)str.size(), NULL, 0);
198 std::wstring wstrTo(size_needed, 0);
199 MultiByteToWideChar(CP_UTF8, 0, str.data(), (int)str.size(), &wstrTo[0], size_needed);
200 return wstrTo;
201}
202
203inline std::string wstring_to_string(const std::wstring& wstr) {
204 if (wstr.empty()) return std::string();

Callers 1

get_driver_versionFunction · 0.85

Calls 3

emptyMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected