[Previous]
[Contents]
[Next]

islower()

test for any lowercase letter

Synopsis:

#include <ctype.h>
int islower( int c );

Description:

The islower() function tests for any lowercase letter 'a' through 'z'.

Returns:

A nonzero value when argument is a lowercase letter, otherwise zero.

Examples:

#include <stdio.h>
#include <ctype.h>

char chars[] = {'A', 'a', 'z', 'Z'};

#define SIZE sizeof( chars ) / sizeof( char )

void main()
  {
    int   i;

    for( i = 0; i < SIZE; i++ ) {
      printf( "Char %c is %sa lowercase character\n",
        chars[i],
        ( islower( chars[i] ) ) ? "" : "not " );
    }
  }

produces the output

Char A is not a lowercase character
Char a is a lowercase character
Char z is a lowercase character
Char Z is not a lowercase character

Classification:

ANSI

Safety:
Interrupt handler Yes
Signal handler Yes
Thread Yes

See also:

isalnum(), isalpha(), iscntrl(), isdigit(), isgraph(), isprint(), ispunct(), isspace(), isupper(), isxdigit(), tolower(), toupper()


[Previous]
[Contents]
[Next]