A character classifier is a C library function or macro from <ctype.h> that tests whether a character belongs to a class. Classifiers accept and return int, preserving independence from character encoding while allowing platform-specific extensions. section 8.4
Classifying digits before conversion
unsigned hexatridecimal(int a) { if (isdigit(a)) return a - '0'; a = toupper(a); return isupper(a) ? 10 + (a - 'A') : -1; } Here, isdigit identifies decimal digits before arithmetic conversion; toupper normalizes letters, and isupper accepts uppercase alphabetic digits. section 8.4

