summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils.c12
-rw-r--r--src/utils.h3
2 files changed, 12 insertions, 3 deletions
diff --git a/src/utils.c b/src/utils.c
index ced6470..d49a9ac 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -10,7 +10,7 @@
#include <ctype.h>
#include "utils.h"
-const char *str_toupper(char *str)
+void str_toupper(char *str)
{
char *c = str;
@@ -18,6 +18,14 @@ const char *str_toupper(char *str)
*c = toupper(*c);
c++;
}
+}
+
+void str_tolower(char *str)
+{
+ char *c = str;
- return str;
+ while (*c) {
+ *c = tolower(*c);
+ c++;
+ }
}
diff --git a/src/utils.h b/src/utils.h
index e32d006..45ecf23 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -1,6 +1,7 @@
#ifndef _OG_UTILS_H
#define _OG_UTILS_H
-const char *str_toupper(char *str);
+void str_toupper(char *str);
+void str_tolower(char *str);
#endif