mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-20 02:28:10 +08:00
Add more documentation.
This commit is contained in:

committed by
Arthur Sonzogni

parent
f2dc080a35
commit
114ab4ae2a
@@ -9,11 +9,13 @@ namespace ftxui {
|
||||
#pragma warning(disable : 4996) // codecvt_utf8_utf16 is deprecated
|
||||
#endif
|
||||
|
||||
/// Convert a UTF8 std::string into a std::wstring.
|
||||
std::string to_string(const std::wstring& s) {
|
||||
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
|
||||
return converter.to_bytes(s);
|
||||
}
|
||||
|
||||
/// Convert a std::wstring into a UTF8 std::string.
|
||||
std::wstring to_wstring(const std::string& s) {
|
||||
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
|
||||
return converter.from_bytes(s);
|
||||
|
Reference in New Issue
Block a user