MCPcopy Create free account
hub / github.com/Kitware/VTK / WStringToUTF8

Function WStringToUTF8

ThirdParty/libproj/vtklibproj/src/filemanager.cpp:537–543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

535// ---------------------------------------------------------------------------
536
537static std::string WStringToUTF8(const std::wstring &wstr) {
538 std::string str;
539 str.resize(wstr.size());
540 str.resize(utf8fromwc(&str[0], static_cast<unsigned>(str.size() + 1),
541 wstr.data(), static_cast<unsigned>(wstr.size())));
542 return str;
543}
544
545// ---------------------------------------------------------------------------
546

Calls 4

utf8fromwcFunction · 0.85
resizeMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected