c:string:string-to-wstring
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
c:string:string-to-wstring [2019/07/26 17:46] – odefta | c:string:string-to-wstring [2019/08/21 14:21] – odefta | ||
---|---|---|---|
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::string wideToStr(const std:: | ||
+ | return conv_.to_bytes(wstr); | ||
+ | } | ||
- | std:: | + | std:: |
- | auto asInt = convert.from_bytes(s); | + | |
- | return std:: | + | |
} | } | ||
</ | </ | ||
c/string/string-to-wstring.txt · Last modified: 2023/07/04 19:36 by 127.0.0.1