summaryrefslogtreecommitdiff
path: root/libkern/toupper.c
diff options
context:
space:
mode:
Diffstat (limited to 'libkern/toupper.c')
-rw-r--r--libkern/toupper.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libkern/toupper.c b/libkern/toupper.c
new file mode 100644
index 00000000..4c0b02ac
--- /dev/null
+++ b/libkern/toupper.c
@@ -0,0 +1,16 @@
+toupper(int c)
+{
+
+ if(c < 'a' || c > 'z')
+ return c;
+ return (c-'a'+'A');
+}
+
+tolower(int c)
+{
+
+ if(c < 'A' || c > 'Z')
+ return c;
+ return (c-'A'+'a');
+}
+