C Data Type Functions - C islower






Determines if a character is a lowercase letter (a?z).

Parameters

ch - character to classify

Return value

Non-zero value if the character is a lowercase letter, zero otherwise.

Example


#include <stdio.h>
#include <ctype.h>
#include <locale.h>
 // w  w  w. ja va2s.  co  m
int main(void)
{
    unsigned char c = '\xe5'; // letter ? in ISO-8859-1
    printf("In the default C locale, \\xe5 is %slowercase\n",
           islower(c) ? "" : "not " );
    setlocale(LC_ALL, "en_GB.iso88591");
    printf("In ISO-8859-1 locale, \\xe5 is %slowercase\n",
           islower(c) ? "" : "not " );
}

The code above generates the following result.