summaryrefslogtreecommitdiff
path: root/protocols/Twitter/src/StringUtil.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Twitter/src/StringUtil.h')
-rw-r--r--protocols/Twitter/src/StringUtil.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/protocols/Twitter/src/StringUtil.h b/protocols/Twitter/src/StringUtil.h
index 902e262c02..ef88318446 100644
--- a/protocols/Twitter/src/StringUtil.h
+++ b/protocols/Twitter/src/StringUtil.h
@@ -30,6 +30,15 @@ tstring GetWord(const tstring& str, unsigned index, bool getRest = false);
std::string& replaceAll(std::string& context, const std::string& from, const std::string& to);
+inline std::string WideToUTF8(const std::wstring& str)
+{
+ return (char*)ptrA(mir_utf8encodeW(str.c_str()));
+}
+
+inline std::wstring UTF8ToWide(const std::string& str)
+{
+ return (wchar_t*)ptrW(mir_utf8decodeW(str.c_str()));
+}
inline bool Compare(const tstring& one, const tstring& two, bool caseSensitive)
{