summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/strconv.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/strconv.h')
-rw-r--r--src/osd/strconv.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/osd/strconv.h b/src/osd/strconv.h
index 69aedd9841c..23455583773 100644
--- a/src/osd/strconv.h
+++ b/src/osd/strconv.h
@@ -25,22 +25,30 @@
#include <windows.h>
-// the result of these functions has to be released with osd_free()
-
+std::string astring_from_utf8(const std::string &s);
std::string astring_from_utf8(const char *s);
+std::string &astring_from_utf8(std::string &dst, std::string &s);
std::string &astring_from_utf8(std::string &dst, const char *s);
+std::string utf8_from_astring(const std::string &s);
std::string utf8_from_astring(const CHAR *s);
+std::string &utf8_from_astring(std::string &dst, const std::string &s);
std::string &utf8_from_astring(std::string &dst, const CHAR *s);
+std::wstring wstring_from_utf8(const std::string &s);
std::wstring wstring_from_utf8(const char *s);
+std::wstring &wstring_from_utf8(std::wstring &dst, std::string &s);
std::wstring &wstring_from_utf8(std::wstring &dst, const char *s);
+std::string utf8_from_wstring(const std::wstring &s);
std::string utf8_from_wstring(const WCHAR *s);
+std::string &utf8_from_wstring(std::string &dst, const std::wstring &s);
std::string &utf8_from_wstring(std::string &dst, const WCHAR *s);
#ifdef UNICODE
+typedef std::wstring tstring;
#define tstring_from_utf8 wstring_from_utf8
#define utf8_from_tstring utf8_from_wstring
#else // !UNICODE
+typedef std::string tstring;
#define tstring_from_utf8 astring_from_utf8
#define utf8_from_tstring utf8_from_astring
#endif // UNICODE