25 Localization library [localization]

25.3 Locales [locales]

25.3.3 Convenience interfaces [locale.convenience]

25.3.3.1 Character classification [classification]

template <class charT> bool isspace (charT c, const locale& loc); template <class charT> bool isprint (charT c, const locale& loc); template <class charT> bool iscntrl (charT c, const locale& loc); template <class charT> bool isupper (charT c, const locale& loc); template <class charT> bool islower (charT c, const locale& loc); template <class charT> bool isalpha (charT c, const locale& loc); template <class charT> bool isdigit (charT c, const locale& loc); template <class charT> bool ispunct (charT c, const locale& loc); template <class charT> bool isxdigit(charT c, const locale& loc); template <class charT> bool isalnum (charT c, const locale& loc); template <class charT> bool isgraph (charT c, const locale& loc); template <class charT> bool isblank (charT c, const locale& loc);

Each of these functions isF returns the result of the expression:

use_facet<ctype<charT>>(loc).is(ctype_base::F, c)

where F is the ctype_­base​::​mask value corresponding to that function ([category.ctype]).232

When used in a loop, it is faster to cache the ctype<> facet and use it directly, or use the vector form of ctype<>​::​is.