C++ cctype islower() Function
Example
Check if a character is a lowercase letter:
char c = 'b';
if (islower(c)) {
cout << c << " is a lowercase letter";
} else {
cout << c << " is not a lowercase letter";
}
Definition and Usage
The islower() function checks if a character is a lowercase letter, from a to z.
It returns a non-zero number (true) if it is, and 0 (false) if it is not.
The islower function is defined in the <cctype> header file.
Tip: Use tolower() to change a letter to lowercase.
Syntax
int islower(int c);
Parameter Values
| Parameter | Description |
|---|---|
| c | Required. The character to check. |
Technical Details
| Returns: | An int value. Non-zero (true) if the character is a lowercase letter, otherwise 0 (false). |
|---|
Related Pages
Read more about strings in our Strings Tutorial.