.TH "std::collate_byname< _CharT >" 3cxx "Wed Jul 14 2021" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::collate_byname< _CharT > \- class collate_byname [22\&.2\&.4\&.2]\&. .SH SYNOPSIS .br .PP .PP Inherits \fBstd::collate< _CharT >\fP\&. .SS "Public Types" .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "typedef _CharT \fBchar_type\fP" .br .RI "Public typedefs\&. " .ti -1c .RI "typedef \fBbasic_string\fP< _CharT > \fBstring_type\fP" .br .RI "Public typedefs\&. " .in -1c .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBcollate_byname\fP (const char *__s, size_t __refs=0)" .br .ti -1c .RI "\fBcollate_byname\fP (const \fBstring\fP &__s, size_t __refs=0)" .br .ti -1c .RI "int \fB_M_compare\fP (const _CharT *, const _CharT *) const throw ()" .br .ti -1c .RI "int \fB_M_compare\fP (const char *, const char *) const throw()" .br .ti -1c .RI "int \fB_M_compare\fP (const wchar_t *, const wchar_t *) const throw()" .br .ti -1c .RI "size_t \fB_M_transform\fP (_CharT *, const _CharT *, size_t) const throw ()" .br .ti -1c .RI "size_t \fB_M_transform\fP (char *, const char *, size_t) const throw()" .br .ti -1c .RI "size_t \fB_M_transform\fP (wchar_t *, const wchar_t *, size_t) const throw()" .br .ti -1c .RI "int \fBcompare\fP (const _CharT *__lo1, const _CharT *__hi1, const _CharT *__lo2, const _CharT *__hi2) const" .br .RI "Compare two strings\&. " .ti -1c .RI "long \fBhash\fP (const _CharT *__lo, const _CharT *__hi) const" .br .RI "Return hash of a string\&. " .ti -1c .RI "\fBstring_type\fP \fBtransform\fP (const _CharT *__lo, const _CharT *__hi) const" .br .RI "Transform string to comparable form\&. " .in -1c .SS "Static Public Attributes" .in +1c .ti -1c .RI "static \fBlocale::id\fP \fBid\fP" .br .RI "Numpunct facet id\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual int \fBdo_compare\fP (const _CharT *__lo1, const _CharT *__hi1, const _CharT *__lo2, const _CharT *__hi2) const" .br .RI "Compare two strings\&. " .ti -1c .RI "virtual long \fBdo_hash\fP (const _CharT *__lo, const _CharT *__hi) const" .br .RI "Return hash of a string\&. " .ti -1c .RI "virtual \fBstring_type\fP \fBdo_transform\fP (const _CharT *__lo, const _CharT *__hi) const" .br .RI "Transform string to comparable form\&. " .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "static __c_locale \fB_S_clone_c_locale\fP (__c_locale &__cloc) throw ()" .br .ti -1c .RI "static void \fB_S_create_c_locale\fP (__c_locale &__cloc, const char *__s, __c_locale __old=0)" .br .ti -1c .RI "static void \fB_S_destroy_c_locale\fP (__c_locale &__cloc)" .br .ti -1c .RI "static __c_locale \fB_S_get_c_locale\fP ()" .br .ti -1c .RI "static const char * \fB_S_get_c_name\fP () throw ()" .br .ti -1c .RI "static __c_locale \fB_S_lc_ctype_c_locale\fP (__c_locale __cloc, const char *__s)" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "__c_locale \fB_M_c_locale_collate\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template .br class std::collate_byname< _CharT >" class collate_byname [22\&.2\&.4\&.2]\&. .PP Definition at line 818 of file locale_classes\&.h\&. .SH "Member Typedef Documentation" .PP .SS "template typedef _CharT \fBstd::collate_byname\fP< _CharT >::\fBchar_type\fP" .PP Public typedefs\&. .PP Definition at line 823 of file locale_classes\&.h\&. .SS "template typedef \fBbasic_string\fP<_CharT> \fBstd::collate_byname\fP< _CharT >::\fBstring_type\fP" .PP Public typedefs\&. .PP Definition at line 824 of file locale_classes\&.h\&. .SH "Member Function Documentation" .PP .SS "template int \fBstd::collate\fP< _CharT >::compare (const _CharT * __lo1, const _CharT * __hi1, const _CharT * __lo2, const _CharT * __hi2) const\fC [inline]\fP, \fC [inherited]\fP" .PP Compare two strings\&. This function compares two strings and returns the result by calling collate::do_compare()\&. .PP \fBParameters\fP .RS 4 \fI__lo1\fP Start of string 1\&. .br \fI__hi1\fP End of string 1\&. .br \fI__lo2\fP Start of string 2\&. .br \fI__hi2\fP End of string 2\&. .RE .PP \fBReturns\fP .RS 4 1 if string1 > string2, -1 if string1 < string2, else 0\&. .RE .PP .PP Definition at line 702 of file locale_classes\&.h\&. .SS "template int \fBstd::collate\fP< _CharT >::do_compare (const _CharT * __lo1, const _CharT * __hi1, const _CharT * __lo2, const _CharT * __hi2) const\fC [protected]\fP, \fC [virtual]\fP, \fC [inherited]\fP" .PP Compare two strings\&. This function is a hook for derived classes to change the value returned\&. .PP \fBSee also\fP .RS 4 compare()\&. .RE .PP \fBParameters\fP .RS 4 \fI__lo1\fP Start of string 1\&. .br \fI__hi1\fP End of string 1\&. .br \fI__lo2\fP Start of string 2\&. .br \fI__hi2\fP End of string 2\&. .RE .PP \fBReturns\fP .RS 4 1 if string1 > string2, -1 if string1 < string2, else 0\&. .RE .PP .PP Definition at line 160 of file locale_classes\&.tcc\&. .PP References std::basic_string< _CharT, _Traits, _Alloc >::c_str(), std::basic_string< _CharT, _Traits, _Alloc >::data(), and std::basic_string< _CharT, _Traits, _Alloc >::length()\&. .SS "template long \fBstd::collate\fP< _CharT >::do_hash (const _CharT * __lo, const _CharT * __hi) const\fC [protected]\fP, \fC [virtual]\fP, \fC [inherited]\fP" .PP Return hash of a string\&. This function computes and returns a hash on the input string\&. This function is a hook for derived classes to change the value returned\&. .PP \fBParameters\fP .RS 4 \fI__lo\fP Start of string\&. .br \fI__hi\fP End of string\&. .RE .PP \fBReturns\fP .RS 4 Hash value\&. .RE .PP .PP Definition at line 255 of file locale_classes\&.tcc\&. .SS "template \fBcollate\fP< _CharT >::\fBstring_type\fP \fBstd::collate\fP< _CharT >::do_transform (const _CharT * __lo, const _CharT * __hi) const\fC [protected]\fP, \fC [virtual]\fP, \fC [inherited]\fP" .PP Transform string to comparable form\&. This function is a hook for derived classes to change the value returned\&. .PP \fBParameters\fP .RS 4 \fI__lo\fP Start\&. .br \fI__hi\fP End\&. .RE .PP \fBReturns\fP .RS 4 transformed string\&. .RE .PP .PP Definition at line 199 of file locale_classes\&.tcc\&. .PP References std::basic_string< _CharT, _Traits, _Alloc >::c_str(), std::basic_string< _CharT, _Traits, _Alloc >::data(), and std::basic_string< _CharT, _Traits, _Alloc >::length()\&. .SS "template long \fBstd::collate\fP< _CharT >::\fBhash\fP (const _CharT * __lo, const _CharT * __hi) const\fC [inline]\fP, \fC [inherited]\fP" .PP Return hash of a string\&. This function computes and returns a hash on the input string\&. It does so by returning collate::do_hash()\&. .PP \fBParameters\fP .RS 4 \fI__lo\fP Start of string\&. .br \fI__hi\fP End of string\&. .RE .PP \fBReturns\fP .RS 4 Hash value\&. .RE .PP .PP Definition at line 735 of file locale_classes\&.h\&. .SS "template \fBstring_type\fP \fBstd::collate\fP< _CharT >::transform (const _CharT * __lo, const _CharT * __hi) const\fC [inline]\fP, \fC [inherited]\fP" .PP Transform string to comparable form\&. This function is a wrapper for strxfrm functionality\&. It takes the input string and returns a modified string that can be directly compared to other transformed strings\&. In the C locale, this function just returns a copy of the input string\&. In some other locales, it may replace two chars with one, change a char for another, etc\&. It does so by returning collate::do_transform()\&. .PP \fBParameters\fP .RS 4 \fI__lo\fP Start of string\&. .br \fI__hi\fP End of string\&. .RE .PP \fBReturns\fP .RS 4 Transformed string_type\&. .RE .PP .PP Definition at line 721 of file locale_classes\&.h\&. .SH "Member Data Documentation" .PP .SS "template \fBlocale::id\fP \fBstd::collate\fP< _CharT >::id\fC [static]\fP, \fC [inherited]\fP" .PP Numpunct facet id\&. .PP Definition at line 661 of file locale_classes\&.h\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.