Add Char16ToWide helper function

This commit is contained in:
Phillip Stephens 2017-01-23 23:55:26 -08:00
parent b8abd466dd
commit c840625080
2 changed files with 6 additions and 0 deletions

View File

@ -53,6 +53,7 @@ extern logvisor::Module LogModule;
std::string WideToUTF8(const std::wstring& src);
std::string Char16ToUTF8(const std::u16string& src);
std::wstring Char16ToWide(const std::u16string& src);
std::wstring UTF8ToWide(const std::string& src);
std::u16string UTF8ToChar16(const std::string& src);

View File

@ -640,4 +640,9 @@ std::vector<std::pair<hecl::SystemString, std::string>> GetSystemLocations()
return ret;
}
std::wstring Char16ToWide(const std::u16string& src)
{
return std::wstring(src.begin(), src.end());
}
}