wstring和string相互转换
wstring to string
std::string stows(std::wstring& ws)
{
std::string curLocale = setlocale(LC_ALL, NULL); // curLocale = "C";
setlocale(LC_ALL, "chs");
const wchar_t* _Source = ws.c_str();
size_t _Dsize = 2 * ws.size() + 1;
char *_Dest = new char[_
原创
2020-07-10 15:43:26 ·
1319 阅读 ·
0 评论