c:string:string-to-wstring
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| c:string:string-to-wstring [2019/06/16 19:40] – created 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. | ||
| <code cpp> | <code cpp> | ||
| - | std:: | + | std:: |
| - | std:: | + | |
| - | auto asInt = convert.from_bytes(s); | + | std::string wideToStr(const std:: |
| - | return | + | return conv_.to_bytes(wstr); |
| + | } | ||
| + | |||
| + | std:: | ||
| + | return conv_.from_bytes(str); | ||
| } | } | ||
| </ | </ | ||
c/string/string-to-wstring.1560714012.txt.gz · Last modified: (external edit)
