Created
November 22, 2020 02:35
-
-
Save ethiapath/6f8a97807c5cff1d51e1491019107727 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool isLowercase(char input) { | |
return input >= 'a' && input <= 'z'; | |
} | |
bool isUppercase(char input) { | |
return input >= 'A' && input <= 'Z'; | |
} | |
char toLowercase(char input) { | |
if(isUppercase(input)) { | |
// Add 32 to convert input to uppercase | |
return input + 32; | |
} | |
return input; | |
} | |
char toLowercase(char input) { | |
if(isUppercase(input)) { | |
// Add 32 to convert input to uppercase | |
return input - 32; | |
} | |
return input; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment