Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

std string to wstring

#include <locale>
#include <codecvt>
#include <string>

std::string str;
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
std::wstring wstr(converter.from_bytes(str));
 
PREVIOUS NEXT
Tagged: #std #string #wstring
ADD COMMENT
Topic
Name
9+8 =