noop: fix indentation/whitespace
[ardour.git] / libs / pbd / convert.cc
index 1787d3b70d9f33f5b95f945bcfd7f14aae039e96..940aa871899390a5278e3b0c430c71c2cc2501d5 100644 (file)
@@ -18,6 +18,9 @@
 */
 
 #include <cmath>
+#include <algorithm>
+#include <string> 
+
 #include <stdint.h>
 #include <stdlib.h>
 #include <cstdio>
@@ -51,6 +54,24 @@ capitalize (const string& str)
         return ret;
 }
 
+string
+downcase (const string& str)
+{
+       string copy (str);
+       std::transform (copy.begin(), copy.end(), copy.begin(), ::tolower);
+       return copy;
+}
+
+const char*
+downcase (const char* str)
+{
+       char *copy = strdup (str);
+       for (char* p = copy; *p; ++p) {
+               *p = tolower (*p);
+       }
+       return copy;
+}
+
 string
 short_version (string orig, string::size_type target_length)
 {