std::isalnum (3) - Linux Man Pages
Defined in header <cctype>
int isalnum( int ch );
Checks if the given character is an alphanumeric character as classified by the current C locale. In the default locale, the following characters are alphanumeric:
* digits (0123456789)
* uppercase letters (ABCDEFGHIJKLMNOPQRSTUVWXYZ)
* lowercase letters (abcdefghijklmnopqrstuvwxyz)
The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.
ch - character to classify
Non-zero value if the character is an alphanumeric character, 0 otherwise.
Like all other functions from <cctype>, the behavior of std::isalnum is undefined if the argument's value is neither representable as unsigned char nor equal to EOF. To use these functions safely with plain chars (or signed chars), the argument should first be converted to unsigned char:
Similarly, they should not be directly used with standard algorithms when the iterator's value type is char or signed char. Instead, convert the value to unsigned char first:
Demonstrates the use of isalnum() with different locales (OS-specific).
// Run this code
isalnum(std::locale) (function template)