Created
June 15, 2017 11:43
-
-
Save vossjannik/b99828d61fd9607ce8644475c3f49bea to your computer and use it in GitHub Desktop.
C++ Narrow To Wide String Conversion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::wstring widen (const std::string& narrow) | |
{ | |
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter; | |
return converter.from_bytes(narrow); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment