Skip to content

Latest commit

 

History

History
65 lines (48 loc) · 1.48 KB

020g_islower.asciidoc

File metadata and controls

65 lines (48 loc) · 1.48 KB

islower

#include <ctype.h>

int islower   (char c);
int islower_l (int c, locale_t locale);
DESCRIPTION

Checks if the given character is classified as a lowercase character according to the current C locale. In the default "C" locale, islower returns true only for the lowercase letters (abcdefghijklmnopqrstuvwxyz).

If islower returns true, it is guaranteed that iscntrl, isdigit, ispunct, and isspace return false for the same character in the same C locale.

The behavior is undefined if the value of c is not representable as unsigned char and is not equal to EOF.

RETURN VALUE

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

SEE ALSO

isalnum, isalpha, isblank, iscntrl, isdigit, isgraph, isprint, ispunct, isspace, isupper, isxdigit

EXAMPLE
link:src/islower1.c[role=include]
OUTPUT
$ gcc -Wall islower1.c
$ ./a.out
islower (_) NO
islower (`) NO
islower (a) YES
islower (b) YES
EXAMPLE
link:src/islower2.c[role=include]
OUTPUT
$ gcc -Wall islower2.c
$ ./a.out
In the default C locale, \xe5 is not lowercase
In ISO-8859-1 locale, \xe5 is lowercase