Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
Miscellaneous
Miscellaneous
complex
exception
functional
iterator
limits
locale
memory
new
numeric
stdexcept
typeinfo
utility
valarray
locale
has_facet
isalnum
isalpha
iscntrl
isdigit
isgraph
islower
isprint
ispunct
isspace
isupper
isxdigit
locale
tolower
toupper
use_facet
standard facets:
codecvt
codecvt_base
codecvt_byname
collate
collate_byname
ctype
ctype_base
ctype_byname
messages
messages_base
messages_byname
moneypunct
moneypunct_byname
money_base
money_get
money_put
numpunct
numpunct_byname
num_get
num_put
time_base
time_get
time_get_byname
time_put
time_put_byname
collate
collate::collate
public member functions:
collate::compare
collate::hash
collate::transform
public member types:
collate::char_type
collate::string_type
protected members:
collate::do_compare
collate::do_hash
collate::do_transform
collate::~collate


collate

class template
<locale>
template <class charT> class collate;

Facet to compare and hash strings

collate

The collate class provides functions to compare and assist in comparing strings for a specific locale and taking into consideration multi-byte character string, when used.

collate objects are prevented to be locally constructed by having a protected destructor. Only those installed in locale objects should be used through mechanisms such as use_facet.

This template class has one template parameter, representing the character type for which the facet returns information. This template parameter is referred in this entire reference as charT.

Public members

It includes the following public member functions:


Along with the following public member types:


Virtual protected members

The class defines the virtual protected members in charge of implementing the expected behavior of their corresponding public member functions:


Along with the class destructor:

collate specializations: numpunct<char> and numpunct<wchar_t>

Two standard specializations define the standard behavior for the char and wchar_t types. In these, the member function compare uses lexicographical ordering (just like lexicographical_compare).