Char Functions
These function are used to work on 'Char' type values.
SRON provides 9 functions for this:
ascii()
isalphabet()
isconsonant()
isdigit()
islower()
isupper()
isvowel()
tolower()
toupper()
1. ascii():
To get the ASCII number of a 'Char' value or you want to get the character value of a ASCII number, then this function is used.
OUTPUT:
65 z
2. isalphabet():
This functions checks if the passed 'Char' type value is an alphabet or not
OUTPUT:
true false
3. isconsonant():
This function checks if the passed 'Char' type value is a consonant or not
OUTPUT:
true false
4. isdigit():
This function checks if the passed 'Char' type value is digit or not
OUTPUT:
false true
5. islower():
This function returns true if the passed 'Char' type value is in lower case otherwise returns false.
OUTPUT:
true false
6. isupper():
This function returns true if the passed 'Char' type value is in upper case otherwise returns false.
OUTPUT:
false true
7. isvowel():
This function is used to check if the passed 'Char' value is a vowel or not.
OUTPUT:
true false
8. tolower():
This function converts the passed 'Char' value to lower case.
OUTPUT:
s
9. toupper():
This function converts the passed 'Char' value to upper case.
OUTPUT:
A
Last updated