diff options
Diffstat (limited to 'src/user/lib/ctype.c')
-rw-r--r-- | src/user/lib/ctype.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/user/lib/ctype.c b/src/user/lib/ctype.c index b702703..7d3a707 100644 --- a/src/user/lib/ctype.c +++ b/src/user/lib/ctype.c @@ -29,3 +29,12 @@ int isupper(int c) { return 'A' <= c && c <= 'Z'; } +int tolower(int c) { + if (isupper(c)) return c - 'A' + 'a'; + return c; +} + +int toupper(int c) { + if (islower(c)) return c - 'a' + 'A'; + return c; +} |