Files
cppdraft_translate/cppdraft/locale/convenience.md
2025-10-25 03:02:53 +03:00

2.7 KiB
Raw Blame History

[locale.convenience]

28 Text processing library [text]

28.3 Localization library [localization]

28.3.3 Locales [locales]

28.3.3.3 Convenience interfaces [locale.convenience]

28.3.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);

1

#

Each of these functions isF returns the result of the expression:use_facet<ctype>(loc).is(ctype_base::F, c) where F is the ctype_base::mask value corresponding to that function ([category.ctype]).216

216)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.

28.3.3.3.2 Character conversions [conversions.character]

🔗

template<class charT> charT toupper(charT c, const locale& loc);

1

#

Returns: use_facet<ctype>(loc).toupper(c).

🔗

template<class charT> charT tolower(charT c, const locale& loc);

2

#

Returns: use_facet<ctype>(loc).tolower(c).