Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

isxdigit - Test for hexadecimal digit

&pagelevel(4)&pagelevel

Definition

#include <ctype.h>

int isxdigit(int c);

isxdigit checks whether the character c from the EBCDIC character set is a hexadecimal
digit (0-9), (A-F) or (a-f).

Return val.

!= 0

0

c is a hexadecimal digit.

c is not a hexadecimal digit.

Note

isxdigit is implemented both as a macro and as a function (see section “Functions and macros”).

Example

#include <ctype.h>
#include <stdio.h>
int main(void)
{
  int c;
  while((c = getchar()) != EOF)
    printf("%s : %c\n",((isxdigit(c))? "Hexadecimal digit" : "Other"), c);
  return 0;
}

See also

isalnum, isascii, iscntrl, isalpha, islower, isprint, ispunct, isgraph, isspace, isupper, isdigit,
isebcdic