summaryrefslogtreecommitdiffstats
path: root/src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c12
1 files changed, 10 insertions, 2 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++;
+ }
}