X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/e19d853bbf16b7ba8c58c71c1da488b9034e0fb3..a8689998a9b2cfc17dc260b423cce8ff2e407adb:/stglibs/common.lib/common.cpp diff --git a/stglibs/common.lib/common.cpp b/stglibs/common.lib/common.cpp index 787b813d..c02f675c 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 value; +} +//--------------------------------------------------------------------------- +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 value; +} +//--------------------------------------------------------------------------- #ifdef WIN32 static int is_leap(unsigned y) {