MCPcopy Create free account
hub / github.com/CelestiaProject/Celestia / StringToWString

Function StringToWString

src/celutil/winutil.cpp:86–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86wstring StringToWString(UINT codePage, const string& s)
87{
88 if (s.empty())
89 return wstring();
90 // get a converted string length
91 int len = MultiByteToWideChar(codePage, 0, s.c_str(), s.length(), NULL, 0);
92 wstring out(len, 0);
93 MultiByteToWideChar(codePage, 0, s.c_str(), s.length(), &out[0], len);
94 return out;
95}
96
97string WideToCurrentCP(const wstring& ws)
98{

Callers 1

CurrentCPToWideFunction · 0.85

Calls 2

emptyMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected