aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-string-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-string-utils.c')
-rw-r--r--camel/camel-string-utils.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/camel/camel-string-utils.c b/camel/camel-string-utils.c
index d9927d629a..6949a9aa53 100644
--- a/camel/camel-string-utils.c
+++ b/camel/camel-string-utils.c
@@ -108,3 +108,36 @@ camel_strdown (char *str)
return str;
}
+
+/**
+ * camel_tolower:
+ * @c:
+ *
+ * ASCII to-lower function.
+ *
+ * Return value:
+ **/
+char camel_tolower(char c)
+{
+ if (c >= 'A' && c <= 'Z')
+ c |= 0x20;
+
+ return c;
+}
+
+/**
+ * camel_toupper:
+ * @c:
+ *
+ * ASCII to-upper function.
+ *
+ * Return value:
+ **/
+char camel_toupper(char c)
+{
+ if (c >= 'a' && c <= 'z')
+ c &= ~0x20;
+
+ return c;
+}
+