c:string:string-to-wstring
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| c:string:string-to-wstring [2019/07/26 14:46] – odefta | c:string:string-to-wstring [2023/07/04 16:36] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Convert std:: | + | ====== Convert |
| Don't use the convert variable inside the to_wstring function. It will make it perform slower. | Don't use the convert variable inside the to_wstring function. It will make it perform slower. | ||
| <code cpp> | <code cpp> | ||
| - | std:: | + | std:: |
| - | std::wstring to_wstring(std::string const & s) { | + | std::string wideToStr(const std::wstring& wstr) { |
| - | auto asInt = convert.from_bytes(s); | + | |
| - | return | + | } |
| + | |||
| + | std:: | ||
| + | return conv_.from_bytes(str); | ||
| } | } | ||
| </ | </ | ||
c/string/string-to-wstring.1564152367.txt.gz · Last modified: (external edit)
