Name

iswdigit - test for decimal digit wide character
libc.lib

Synopsis

  #include <wctype.h>
  int iswdigit (wint_t wch);

Return values

The functions return non-zero if ’wch’ is a wide digit and zero otherwise.

Detailed description

The iswdigit() function tests whether ’wch’ is a wide digit. 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 digit(see defns for definition), irrespective of the locale they belong to.

For example, the digits 0 to 9 fall under class digit.


Examples

#include<wctype.h> //iswdigit()
#include<stdio.h> //printf()
void test_iswdigit()
{
   int arr[]={’8’,0xe1,’5’,’Z’,0xfd,
   0xFF12,0xFF19,0xFF71,0x03A3};
   int i = 0;
   int size = 9;
   for( i=0; i<size; i++)
   {
     int ret = iswdigit(arr[i]); //call to the API with chars in arr[]
     if( (!ret) != 0 )
     {
         printf("\n%lc is not a wide digit", arr[i]);
     }
     else
     {
         printf("\n%lc is a wide digit", arr[i]);
     }
   }
printf("\n");
}


Output

8 is wide digit
«¡ is not wide digit
5 is wide digit
Z is not wide digit
«ò is not wide digit
£² is wide digit
£¹ is wide digit
± is not wide digit
¦² is not wide digit


See also

isdigit, iswctype

Feedback

For additional information or queries on this page send feedback

© 2008 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user.

Top