Jump to content

C++ Language/Std/Strings/CharacterCategories

From Wikibooks, open books for an open world

There are functions for classifying a character as belonging to a category. The examples isdigit('0'), isspace(' '), and ispunct('!') all return true (in the form of a non-zero int value).

Additional information about character categories (includes interactive examples)