summaryrefslogtreecommitdiff
path: root/libc/include/ctype.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/include/ctype.h')
-rw-r--r--libc/include/ctype.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/include/ctype.h b/libc/include/ctype.h
index 22e3e81..b57abbb 100644
--- a/libc/include/ctype.h
+++ b/libc/include/ctype.h
@@ -16,5 +16,7 @@ static inline int isgraph(int c) { return !iscntrl(c) && !isspace(c); }
static inline int isprint(int c) { return !iscntrl(c); }
static inline int ispunct(int c) { return !iscntrl(c) && !isspace(c) && !isalnum(c); }
+static inline int toupper(int c) { return islower(c) ? c & ~0x20 : c; }
+static inline int tolower(int c) { return isupper(c) ? c | 0x20 : c; }
#endif