From e96885c38e41425d4fa567e7bfeef7ab760449ac Mon Sep 17 00:00:00 2001 From: wyy Date: Thu, 29 May 2014 23:57:32 +0800 Subject: [PATCH] update limonp/codeconverter.hpp --- src/Limonp/CodeConverter.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Limonp/CodeConverter.hpp b/src/Limonp/CodeConverter.hpp index 5082a66..6806368 100644 --- a/src/Limonp/CodeConverter.hpp +++ b/src/Limonp/CodeConverter.hpp @@ -39,7 +39,12 @@ namespace Limonp private: iconv_t _iconv_handle; }; - + + inline bool code_convert(const char* from_charset, const char* to_charset, const string& from, string& to) + { + CodeConverter cc(from_charset, to_charset); + return cc.convert(from, to); + } } #endif