MCPcopy Create free account
hub / github.com/covscript/covscript / wstring_to_utf8

Function wstring_to_utf8

sources/system/win32/common.cpp:49–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49std::string wstring_to_utf8(std::wstring_view wide)
50{
51 std::string out;
52#if WCHAR_MAX == 0xffff
53 utf8::utf16to8(wide.begin(), wide.end(), std::back_inserter(out));
54#else
55 utf8::utf32to8(wide.begin(), wide.end(), std::back_inserter(out));
56#endif
57 return out;
58}
59
60namespace cs_system_impl {
61 bool chmod_impl(const std::string &path, unsigned int mode)

Callers 1

openFunction · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected