As I know I may assign to a string a literal value as:
std::string s="good";
std::wstring s=L"good";
how do I assign to a
std::u16string s=
std::u32string s=
You can read about the C++ string literals here.
In particular for UTF-16 literals you prefix with a lowercase u:
u16string s = u"...";
And for UTF-32 literals you prefix with a uppercase U:
u32string s = U"...";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With