[locale.convenience] # 28 Text processing library [[text]](./#text) ## 28.3 Localization library [[localization]](localization#locale.convenience) ### 28.3.3 Locales [[locales]](locales#locale.convenience) #### 28.3.3.3 Convenience interfaces [locale.convenience] #### [28.3.3.3.1](#classification) Character classification [[classification]](classification) [🔗](#lib:isspace) `template bool isspace (charT c, const locale& loc); template bool isprint (charT c, const locale& loc); template bool iscntrl (charT c, const locale& loc); template bool isupper (charT c, const locale& loc); template bool islower (charT c, const locale& loc); template bool isalpha (charT c, const locale& loc); template bool isdigit (charT c, const locale& loc); template bool ispunct (charT c, const locale& loc); template bool isxdigit(charT c, const locale& loc); template bool isalnum (charT c, const locale& loc); template bool isgraph (charT c, const locale& loc); template bool isblank (charT c, const locale& loc); ` [1](#classification-1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L1240) Each of these functions is*F* returns the result of the expression:use_facet>(loc).is(ctype_base::*F*, c) where *F* is the ctype_base​::​mask value corresponding to that function ([[category.ctype]](category.ctype "28.3.4.2 The ctype category"))[.](#classification-1.sentence-1)[216](#footnote-216 "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.") [216)](#footnote-216)[216)](#footnoteref-216) 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[.](#footnote-216.sentence-1) #### [28.3.3.3.2](#conversions.character) Character conversions [[conversions.character]](conversions.character) [🔗](#lib:toupper) `template charT toupper(charT c, const locale& loc); ` [1](#conversions.character-1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L1262) *Returns*: use_facet>(loc).toupper(c)[.](#conversions.character-1.sentence-1) [🔗](#lib:tolower) `template charT tolower(charT c, const locale& loc); ` [2](#conversions.character-2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L1273) *Returns*: use_facet>(loc).tolower(c)[.](#conversions.character-2.sentence-1)