The OpenD Programming Language

isGraphical

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

Return Value

Type: bool

Whether or not c is a printable character other than the space character.

Examples

assert( isGraphical('1'));
assert( isGraphical('a'));
assert( isGraphical('#'));
assert(!isGraphical(' ')); // whitespace is not graphical
assert(!isGraphical('\n'));
assert(!isGraphical('\0'));

// N.B.: Unicode graphical characters are not regarded as such.
assert(!isGraphical('á'));

Meta