Name
locale class — Represents a locale as a set of facets
Synopsis
class locale{ public: class facet; class id; typedef int category; static const category none, collate, ctype, monetary, numeric, time, messages, all = collate|ctype|monetary|numeric|time|messages; // Construct/copy/destroy locale( ) throw( ); locale(const locale& other) throw( ); explicit locale(const char* std_name); locale(const locale& other, const char* std_name,category); template <typename Facet> locale(const locale& other, Facet* f); locale(const locale& other, const locale& one, category); ~locale( ) throw( ); const locale& operator=(const locale& other) throw( ); template <typename Facet> locale combine(const locale& other) const; basic_string<char> name( ) const; bool operator==(const locale& other) const; bool operator!=(const locale& other) const; template <typename charT, typename Traits, typename Alloc> bool operator( )(const basic_string<charT,Traits,Alloc>& s1, const basic_string<charT,Traits,Alloc>& s2) const; static locale global(const locale&); static const locale& classic( ); };
The locale
class template
represents the information for a locale. This information is stored
as a set of facets. Several facets are defined by the C++ standard,
and user-defined facets can be added to any locale. The has_facet
function template tests whether
a locale supports a particular facet. The use_facet
function template retrieves a
facet of a locale.
References to a facet are safe until all locale objects that use ...
Get C++ In a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.