20 #ifndef INCLUDE_UTIL_TCHAR_HPP 21 #define INCLUDE_UTIL_TCHAR_HPP 25 #include <RCF/Config.hpp> 26 #include <RCF/Export.hpp> 28 #if (defined(UNICODE) || defined(_UNICODE)) && !defined(RCF_WINDOWS) 29 #error UNICODE and _UNICODE should only be defined for Windows builds. 34 RCF_EXPORT std::wstring stringToWstring(
const std::string &s);
35 RCF_EXPORT std::string wstringToString(
const std::wstring &ws);
38 RCF_EXPORT std::string u8stringToString(
const std::u8string& u8s);
40 RCF_EXPORT std::string u8stringToString(
const std::string& u8s);
43 #if (defined(UNICODE) || defined(_UNICODE)) 45 #define RCF_T(x) L ## x 46 typedef std::wstring tstring;
47 inline tstring toTstring(
const std::string & s) {
return stringToWstring(s); }
48 inline tstring toTstring(
const std::wstring & s) {
return s; }
49 inline std::string toAstring(
const tstring & s) {
return wstringToString(s); }
50 inline std::wstring toWstring(
const tstring & s) {
return s; }
55 typedef std::string tstring;
56 inline tstring toTstring(
const std::string & s) {
return s; }
57 inline tstring toTstring(
const std::wstring & ws) {
return wstringToString(ws); }
58 inline std::string toAstring(
const tstring & s) {
return s; }
59 inline std::wstring toWstring(
const tstring & s) {
return stringToWstring(s); }
65 #endif // ! INCLUDE_UTIL_TCHAR_HPP Definition: AmiIoHandler.hpp:23