FreeBSD Manual Pages
std::collate_byname(3) C++ Standard Libary std::collate_byname(3) NAME std::collate_byname - std::collate_byname Synopsis Defined in header <locale> template< class CharT > class collate_byname : public std::collate<CharT>; std::collate_byname is a std::collate facet which encapsulates lo- cale-specific collation (comparison) and hashing of strings. Just like std::col- late, it can be imbued in std::regex and applied, by means of std::locale::opera- tor(), directly to all standard algorithms that expect a string comparison predicate. Two specializations are provided by the standard library Defined in header <locale> std::collate_byname<char> locale-specific collation of multibyte strings std::collate_byname<wchar_t> locale-specific collation of wide strings Member functions constructor constructs a new collate_byname facet (public member function) destructor destroys a collate_byname facet (protected member function) std::collate_byname::collate_byname explicit collate_byname( const char* name, std::size_t refs = 0 ); explicit collate_byname( const std::string& name, std::size_t refs = (since C++11) 0 ); Constructs a new std::collate_byname facet for a locale with name. refs is used for resource management: if refs == 0, the implementa- tion 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_byname protected: ~collate_byname(); Destroys the facet. Inherited from std::collate Member types Member type Definition char_type charT string_type std::basic_string<charT> Member functions compare invokes do_compare (public member function of std::collate<CharT>) transform invokes do_transform (public member function of std::collate<CharT>) hash invokes do_hash (public member function of std::collate<CharT>) Protected member functions do_compare compares two strings using this facet's collation rules [virtual] (virtual protected member function of std::col- late<CharT>) do_transform transforms a string so that collation can be replaced by comparison [virtual] (virtual protected member function of std::col- late<CharT>) do_hash generates an integer hash value using this facet's col- lation rules [virtual] (virtual protected member function of std::col- late<CharT>) 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". Example This section is incomplete Reason: no example See also collate defines lexicographical comparison and hashing of strings (class template) strcoll compares two strings in accordance to the current locale (function) wcscoll compares two wide strings in accordance to the current locale (function) operator() lexicographically compares two strings using this lo- cale's collate facet (public member function of std::locale) http://cppreference.com 2022.07.31 std::collate_byname(3)
NAME | Synopsis | Member functions | Parameters | Member types | Member functions | Protected member functions | Notes | Example | See also
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::collate_byname&sektion=3&manpath=FreeBSD+Ports+15.0>
