C character classification

[1] Early C programmers working on the Unix operating system developed programming idioms for classifying characters.

But, due to limitations of macro evaluation, they are generally not implemented today as they were in early versions of Linux like: This can lead to an error when the macro parameter x is expanded to an expression with a side effect; for example: isdigit(x++).

For example, the standard library provides an array of 256 integers – one for each character value – that each contain a bit-field for each supported classification.

The functions that operate on single-byte characters are defined in ctype.h header file (cctype in C++).

The functions that operate on wide characters are defined in wctype.h header file (cwctype in C++).