Name

islower - character classification routines

Library

libc.lib

Synopsis

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

Return values

The islower function returns non-zero is ’c’ is a lower-case alphabet and zero otherwise.

Detailed description

The islower function tests if ’c’ belongs to the set of lower-case letters i.e. it belongs to class lower(see defns for definition). For single character representations, the value of the argument is representable as an unsigned char or the value of EOF.

The functionality of this API is independent of the program’s current locale and so it returns non-zero for all the characters (of various locales supported) that belong to the class lower, irrespective of the locale they belong to.


Examples

#include<ctype.h> //islower()
#include<stdio.h> //printf()
int test_islower()
{
  int arr[]={0x0126,0xee,’r’,’9’,’g’};
  int i = 0;
  int size = 5;
  for( i=0; i<size; i++)
  {
     int ret = islower(arr[i]); //call to the API with chars in the arr[]
     if( (!ret) != 0 )
     {
         printf("\n%c is not in lower-case ", arr[i]);
     }
     else
     {
         printf("\n%c is in lower-case", arr[i]);
     }
  }
printf("\n");
}

         

Output

& is not in lower-case
î is in lower-case
r is in lower-case
9 is not in lower-case
g is in lower-case

         

See also

iswlower, tolower

Feedback

For additional information or queries on this page send feedback

© 2005-2007 Nokia

Top