Set this string's data from an existing std::wstring. Data will be always copied. Translation will occur if necessary based on the underlying string type.
| 595 | // type. |
| 596 | /// |
| 597 | bool FromWString(const std::wstring& str) { |
| 598 | if (str.empty()) { |
| 599 | clear(); |
| 600 | return true; |
| 601 | } |
| 602 | AllocIfNeeded(); |
| 603 | return traits::from_wstring(str, string_); |
| 604 | } |
| 605 | |
| 606 | /// |
| 607 | // Return this string's data as a string16. Translation will occur if |