#include <ctype.h>
|
|
int
islower (int c); |
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.
#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
|
© 2005-2007 Nokia |