isxdigit, iswxdigit

De RAD Studio
Aller à : navigation, rechercher

Remonter à Ctype.h - Index


Header File

ctype.h, wctype.h

Category

Classification Routines

Prototype

int isxdigit(int c);

int iswxdigit(wint_t c);

Description

Tests for hexadecimal character.

isxdigit is a macro that classifies ASCII-coded integer values by table lookup. The macro is affected by the current locale’s LC_CTYPE category.

You can make this macro available as a function by undefining (#undef) it.

Return Value

isxdigit returns nonzero if c is a hexadecimal digit (0 to 9, A to F, a to f) or any other hexadecimal digit defined by the locale.

Example



 #include <stdio.h>
 #include <ctype.h>
 int main(void)
 {
   char c = 'C';
   if (isxdigit(c))
     printf("%c is a hexadecimal digit\n",c);
   else
     printf("%c is not a hexadecimal digit\n",c);
   return 0;
 }



Portability



POSIX Win32 ANSI C ANSI C++

isxdigit

+

+

+

+

iswxdigit

+

+

+