ASCII_IS_DIG_HEX() / ASCII_IsDigHex()

Determines whether a character is a hexadecimal-digit character.

Files

lib_ascii.h/lib_ascii.c

Prototypes

          ASCII_IS_DIG_HEX(ch);
           
          CPU_BOOLEAN  ASCII_IsDigHex (CPU_CHAR  ch);

Arguments

ch

Character to examine.

Returned Value

DEF_YES,

if character is a hexadecimal-digit character;

DEF_NO,

if character is not a hexadecimal-digit character.

Required Configuration

None.

Notes / Warnings

ISO/IEC 9899:TC2, Section 7.4.1.12.(2) states that “isxdigit() … tests for any hexadecimal-digit character”.

Example Usage

          CPU_CHAR     ch;
          CPU_BOOLEAN  dig_hex;


          ch      = ASCII_CHAR_LATIN_UPPER_C;
          dig_hex = ASCII_IS_DIG_HEX(ch);