xref: /plan9/sys/src/ape/lib/ap/gen/toupper.c (revision 3e12c5d1bb89fc02707907988834ef147769ddaf)
1 #include	<ctype.h>
2 
toupper(int c)3 toupper(int c)
4 {
5 
6 	if(c < 'a' || c > 'z')
7 		return c;
8 	return (c-'a'+'A');
9 }
10 
tolower(int c)11 tolower(int c)
12 {
13 
14 	if(c < 'A' || c > 'Z')
15 		return c;
16 	return (c-'A'+'a');
17 }
18