aboutsummaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/string.c b/string.c
index e182948..eeaaba2 100644
--- a/string.c
+++ b/string.c
@@ -27,6 +27,7 @@
#include <sys/types.h>
#include <stdbool.h>
#include <stdlib.h>
+#include <ctype.h>
#include "error.h"
#include "mig_string.h"
@@ -77,3 +78,13 @@ strstring(const_string_t string)
else
return string;
}
+
+char *
+strupper(const_string_t string)
+{
+ string_t upper = strmake(string);
+
+ for (int i=0; i<strlen(upper); i++)
+ upper[i] = toupper(upper[i]);
+ return upper;
+}