about summary refs log tree commit diff stats
path: root/src/tools/fileutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/fileutils.c')
-rwxr-xr-xsrc/tools/fileutils.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tools/fileutils.c b/src/tools/fileutils.c
index 04905c04..d6d15568 100755
--- a/src/tools/fileutils.c
+++ b/src/tools/fileutils.c
@@ -134,6 +134,18 @@ const char* GetTmpDir() {
     return "/tmp";  // meh...
 }
 
+char* LowerCase(const char* s) {
+    if(!s)
+        return NULL;
+    char* ret = box_calloc(1, strlen(s)+1);
+    size_t i=0;
+    while(*s) {
+        ret[i++] = (*s>='A' && *s<='Z')?(*s-'A'+'a'):(*s);
+        ++s;
+    }
+
+    return ret;
+}
 
 #if defined(RPI) || defined(RK3399) || defined(RK3326)
 void sanitize_mojosetup_gtk_background()