summaryrefslogtreecommitdiffstats
path: root/avahi-core/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'avahi-core/util.c')
-rw-r--r--avahi-core/util.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/avahi-core/util.c b/avahi-core/util.c
index 514f0d9..4fe8737 100644
--- a/avahi-core/util.c
+++ b/avahi-core/util.c
@@ -27,6 +27,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
+#include <ctype.h>
#include <glib.h>
@@ -91,3 +92,26 @@ char *avahi_format_mac_address(const uint8_t* mac, size_t size) {
return r;
}
+
+
+char *avahi_strdown(char *s) {
+ char *c;
+
+ assert(s);
+
+ for (c = s; *c; c++)
+ *c = (char) tolower(*c);
+
+ return s;
+}
+
+char *avahi_strup(char *s) {
+ char *c;
+ assert(s);
+
+ for (c = s; *c; c++)
+ *c = (char) toupper(*c);
+
+ return s;
+}
+