std::collate_byname
is a std::collate facet which encapsulates locale-specific collation (comparison) and hashing of strings. Just like std::collate, it can be imbued in std::regex and applied, by means of std::locale::operator(), directly to all standard algorithms that expect a string comparison predicate.
The standard library is guaranteed to provide the following specializations:
std::collate_byname<char> locale-specific collation of multibyte strings std::collate_byname<wchar_t> locale-specific collation of wide strings [edit] Member functions constructs a newcollate_byname
facet
collate_byname
facet
Constructs a new std::collate_byname
facet for a locale with name.
refs is used for resource management: if refs == 0, the implementation destroys the facet, when the last std::locale object holding it is destroyed. Otherwise, the object is not destroyed.
Parameters name - the name of the locale refs - the number of references that link to the facet std::collate_byname::~collate_bynameprotected:
~collate_byname();
Destroys the facet.
Inherited from std::collate Nested types [edit] Data members Member functions invokesdo_compare
std::collate<CharT>
) [edit] invokes do_transform
std::collate<CharT>
) [edit] invokes do_hash
std::collate<CharT>
) [edit] Protected member functions compares two strings using this facet's collation rules
std::collate<CharT>
) [edit] transforms a string so that collation can be replaced by comparison
std::collate<CharT>
) [edit] generates an integer hash value using this facet's collation rules
std::collate<CharT>
) [edit] [edit] Notes
Collation order is the dictionary order: the position of the letter in the national alphabet (its equivalence class) has higher priority than its case or variant. Within an equivalence class, lowercase characters collate before their uppercase equivalents and locale-specific order may apply to the characters with diacritics. In some locales, groups of characters compare as single collation units. For example, "ch" in Czech follows "h" and precedes "i", and "dzs" in Hungarian follows "dz" and precedes "g".
[edit] Example [edit] See also defines lexicographical comparison and hashing of stringsstd::locale
) [edit]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4