MCPcopy Create free account
hub / github.com/OpenBoardView/OpenBoardView / utf16_to_utf8

Function utf16_to_utf8

src/openboardview/win32.cpp:19–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17#endif
18
19const std::string utf16_to_utf8(const std::wstring &wtext) {
20 return std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t>{}.to_bytes(wtext.c_str());
21}
22
23const std::wstring utf8_to_utf16(const std::string &text) {
24 return std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t>{}.from_bytes(text.c_str());

Callers 6

get_user_dirFunction · 0.85
GetDDEStringMethod · 0.85
DdeCallbackMethod · 0.85
ConnectDDEClientMethod · 0.85
ExecuteDDECommandMethod · 0.85
OpenDocumentMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected