MCPcopy Create free account
hub / github.com/Norbyte/ositools / ToUTF8

Function ToUTF8

OsiLoader/Utils.cpp:143–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141
142
143std::string ToUTF8(std::wstring const & s)
144{
145 int size = WideCharToMultiByte(CP_UTF8, 0, s.c_str(), (int)s.size(), NULL, 0, NULL, NULL);
146 std::string converted;
147 converted.resize(size);
148 WideCharToMultiByte(CP_UTF8, 0, s.c_str(), (int)s.size(), converted.data(), (int)converted.size(), NULL, NULL);
149 return converted;
150}
151
152
153std::wstring FromUTF8(std::string const & s)

Callers 1

FetchETagMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected