]> git.stg.codes - stg.git/blobdiff - stglibs/common.lib/common.cpp
Moved CHG_USER and SEND_MESSAGE parsers from global scope.
[stg.git] / stglibs / common.lib / common.cpp
index 787b813d3728bf975571f4401756ad3863526a8a..763df5327976b77c141830d310def3999d8b2917 100644 (file)
@@ -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)
 {