Prototype: int isxdigit (int c); header file: ctype.h function: Check if parameter C is a 16-digit number, as long as C is one of the following conditions returns TRUE. 16 binary number: 0123456789ABCDEF. Return value: Returns true if the parameter C is 16 digits, otherwise null (0) is returned. Additional notes: This is a macro definition, not a real function.
Function Simulation Source code:
int isxdigit (int c) { return (' 0 ' <= C && c <= ' 9 ') | | (' A ' <= c && c <= ' F ') | | (' A ' <= C && c <= ' F ');}
Application Examples:
#include <stdio.h> #include <ctype.h>main () { char str[]= "A3 4%8}9 [e*&^%?"; int i = 0; for (i=0;str[i]!=0;i++) { if (Isxdigit (Str[i])) { printf ("%c is hexadecimal number \ n", Str[i]); } else { printf ("%c is not hexadecimal number \ n", Str[i]);} }}
Operation Result:
Isxdigit String Test Function application Example