C++ wchar_t char wstring string 转换


1.wchart_t转wstring

1 wchar_t tmpRuleStr[10] = ; 2 wstring m_tmpRuleStr = wstring(tmpRuleStr);

2.wstring转wchar_t

1 wstring str = "123"; 2 wchar_t* tmp = wstr_str();

3.string转wstring

1 std::wstring UTF8ToUnicode(const std::string& utf) 2 9 std::wstring AnsiToUnicode(const std::string& str) 10

4.wstring转string

1 std::string UnicodeToUTF8(const std::wstring& str) 2 11 12 std::string UnicodeToAnsi(const std::wstring& str) 13



上一篇:解决 OpenAI‘s API is not available in your country

下一篇:循环肿瘤细胞检测技术分类,优点和局限性!


C/C++
Copyright © 2002-2019 k262电脑网 www.k262.cn 皖ICP备2020016292号
温馨提示:部分文章图片数据来源与网络,仅供参考!版权归原作者所有,如有侵权请联系删除!QQ:251442993 热门搜索 网站地图