Utility.hpp
Go to the documentation of this file.
1 
4 #ifndef GOSU_UTILITY_HPP
5 #define GOSU_UTILITY_HPP
6 
7 #include <string>
8 #include <vector>
9 
10 namespace Gosu
11 {
13  std::wstring utf8ToWstring(const std::string& utf8);
15  std::string wstringToUTF8(const std::wstring& ws);
16 
18  std::wstring widen(const std::string& s);
20  std::string narrow(const std::wstring& ws);
21 
25  std::string language();
26 }
27 
28 #endif
std::string wstringToUTF8(const std::wstring &ws)
Converts an std::wstring into an std::string.
std::string language()
Returns the user&#39;s preferred language, at the moment of calling the function.
std::wstring utf8ToWstring(const std::string &utf8)
Converts an std::string into an std::wstring.
std::string narrow(const std::wstring &ws)
Converts an std::wstring into an std::string using local encoding.
std::wstring widen(const std::string &s)
Converts an std::string into an std::wstring using local encoding.