forked from Bananymous/banan-os
				
			LibC: add toupper, tolower in ctype.h
This commit is contained in:
		
							parent
							
								
									0adf24fcad
								
							
						
					
					
						commit
						d922c5e1d0
					
				|  | @ -64,3 +64,17 @@ int isxdigit(int c) | |||
| { | ||||
| 	return isdigit(c) || ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F'); | ||||
| } | ||||
| 
 | ||||
| int toupper(int c) | ||||
| { | ||||
| 	if (!islower(c)) | ||||
| 		return c; | ||||
| 	return 'A' + (c - 'a'); | ||||
| } | ||||
| 
 | ||||
| int tolower(int c) | ||||
| { | ||||
| 	if (!isupper(c)) | ||||
| 		return c; | ||||
| 	return 'a' + (c - 'A'); | ||||
| } | ||||
|  |  | |||
|  | @ -18,4 +18,7 @@ int isspace(int); | |||
| int isupper(int); | ||||
| int isxdigit(int); | ||||
| 
 | ||||
| int toupper(int); | ||||
| int tolower(int); | ||||
| 
 | ||||
| __END_DECLS | ||||
		Loading…
	
		Reference in New Issue