30 Localization library [localization]

30.4 Standard locale categories [locale.categories]

30.4.5 The collate category [category.collate]

30.4.5.1 Class template collate [locale.collate]

30.4.5.1.3 Virtual functions [locale.collate.virtuals]

int do_compare(const charT* low1, const charT* high1, const charT* low2, const charT* high2) const;
Returns: 1 if the first string is greater than the second, -1 if less, zero otherwise.
The specializations required in Table 104 ([locale.category]), namely collate<char> and collate<wchar_t>, implement a lexicographical comparison ([alg.lex.comparison]).
string_type do_transform(const charT* low, const charT* high) const;
Returns: A basic_string<charT> value that, compared lexicographically with the result of calling transform() on another string, yields the same result as calling do_compare() on the same two strings.253
long do_hash(const charT* low, const charT* high) const;
Returns: An integer value equal to the result of calling hash() on any other string for which do_compare() returns 0 (equal) when passed the two strings.
Recommended practice: The probability that the result equals that for another string which does not compare equal should be very small, approaching (1.0/numeric_limits<unsigned long>​::​max()).
253)253)
This function is useful when one string is being compared to many other strings.