From: Maxim Mamontov Date: Sat, 10 Jan 2015 20:07:04 +0000 (+0200) Subject: Added handy encoding functions. X-Git-Tag: 2.409~221 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/554a2f77f485f55c8c62ae9d854a2198b2c0f98f?ds=sidebyside Added handy encoding functions. --- diff --git a/stglibs/common.lib/include/stg/common.h b/stglibs/common.lib/include/stg/common.h index e2eb0d58..ddc69def 100644 --- a/stglibs/common.lib/include/stg/common.h +++ b/stglibs/common.lib/include/stg/common.h @@ -66,6 +66,8 @@ void Decode21(char * dst, const char * src); void Encode12str(std::string & dst, const std::string & src); void Decode21str(std::string & dst, const std::string & src); +inline std::string Encode12str(const std::string & src) { std::string dst; Encode12str(dst, src); return dst; } +inline std::string Decode21str(const std::string & src) { std::string dst; Decode21str(dst, src); return dst; } int ParseIPString(const char * str, uint32_t * ips, int maxIP); void KOIToWin(const char * s1, char * s2, int l);