X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/1347f3d1e04bedd1508589173f577673ee2c5554..7d8f69bd16c0e415d771a29c367519f26184ffae:/stglibs/common.lib/common.cpp diff --git a/stglibs/common.lib/common.cpp b/stglibs/common.lib/common.cpp index 787b813d..763df532 100644 --- a/stglibs/common.lib/common.cpp +++ b/stglibs/common.lib/common.cpp @@ -819,6 +819,22 @@ std::string & Trim(std::string & val) return TrimR(TrimL(val)); } //--------------------------------------------------------------------------- +std::string ToLower(const std::string & value) +{ + std::string res; + for (std::string::size_type pos = 0; pos < value.length(); ++pos) + res += tolower(value[pos]); + return res; +} +//--------------------------------------------------------------------------- +std::string ToUpper(const std::string & value) +{ + std::string res; + for (std::string::size_type pos = 0; pos < value.length(); ++pos) + res += toupper(value[pos]); + return res; +} +//--------------------------------------------------------------------------- #ifdef WIN32 static int is_leap(unsigned y) {