]> git.stg.codes - stg.git/blobdiff - stglibs/common.lib/common.cpp
Added ToLower/ToUpper.
[stg.git] / stglibs / common.lib / common.cpp
index 1068cfa12ed085351486dd462b844cc7603a4d73..8c3eb1a5e62dee205e800cf2a9cb07ed6dec26da 100644 (file)
@@ -820,6 +820,18 @@ std::string & Trim(std::string & val)
 return TrimR(TrimL(val));
 }
 //---------------------------------------------------------------------------
+std::string ToLower(std::string value)
+{
+    std::transform(value.begin(), value.end(), value.begin(), ::tolower);
+    return value;
+}
+//---------------------------------------------------------------------------
+std::string ToUpper(std::string value)
+{
+    std::transform(value.begin(), value.end(), value.begin(), ::toupper);
+    return value;
+}
+//---------------------------------------------------------------------------
 #ifdef WIN32
 static int is_leap(unsigned y)
 {