#include <wctype.h>
|
|
int
iswlower (wint_t wch); |
The iswlower() function tests whether ’wch’ is a wide-character which is from among lower-case alphabets.
Characters that belong to class cntrl, class punct and digit are not a part of class lower(see defns for definition).
The result of this function is undefined unless the argument is WEOF or a valid wchar_t value.
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(see defns for definition), irrespective of the locale they belong to.
#include<wctype.h> //iswlower()
#include<stdio.h> //printf()
int test_iswlower()
{
int arr[]={ 0x0126, 0xee, ’r’ , ’9’ , ’g’, 0xFF51, 0x0451, 0x03CE };
int i = 0;
int size = 8;
for( i=0; i<size; i++)
{
int ret = iswlower(arr[i]); //call to the API with chars in arr[]
if( (!ret) != 0 )
{
printf("\n%lc is not wide lower-case ", arr[i]);
}
else
{
printf("\n%lc is wide lower-case", arr[i]);
}
}
printf("\n");
}
Output
©¤ is not wide lower-case
«Â is wide lower-case
r is wide lower-case
9 is not wide lower-case
g is wide lower-case
£ñ is wide lower-case
§× is wide lower-case
¦ü is wide lower-case
|
© 2005-2007 Nokia |