The OpenD Programming Language

isHexDigit

@safe pure nothrow @nogc
bool
isHexDigit
(
dchar c
)

Return Value

Type: bool

Whether c is a digit in base 16 (0 .. 9, A .. F, a .. f).

Examples

assert( isHexDigit('0'));
assert( isHexDigit('A'));
assert( isHexDigit('f')); // lowercase hex digits are accepted
assert(!isHexDigit('g'));
assert(!isHexDigit('G'));
assert(!isHexDigit('#'));

Meta