X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/669bf62b01b121a3c9fc5092cd9d2ab3392fd92c..d4c4fa8efc14b0b5e9bbca41af0e24e652a28d11:/stglibs/common.lib/include/stg/common.h?ds=inline diff --git a/stglibs/common.lib/include/stg/common.h b/stglibs/common.lib/include/stg/common.h index eeb68b51..6af1309f 100644 --- a/stglibs/common.lib/include/stg/common.h +++ b/stglibs/common.lib/include/stg/common.h @@ -103,6 +103,7 @@ std::string ToLower(const std::string & value); std::string ToUpper(const std::string & value); template +inline C Split(const std::string & value, char delim, F conv) { C res; @@ -119,6 +120,7 @@ return res; } template +inline T FromString(const std::string & value) { T res; @@ -127,10 +129,18 @@ stream >> res; return res; } +template <> +inline +std::string FromString(const std::string & value) +{ +return value; +} + template +inline C Split(const std::string & value, char delim) { - return Split(value, delim, FromString); + return Split(value, delim, FromString); } std::string IconvString(const std::string & source, const std::string & from, const std::string & to);