std::collate<CharT>::transform,do_transform (3) - Linux Manuals
std::collate<CharT>::transform,do_transform: std::collate<CharT>::transform,do_transform
NAME
std::collate<CharT>::transform,do_transform - std::collate<CharT>::transform,do_transform
Synopsis
Defined in header <locale>
public: (1)
string_type transform( const CharT* low, const CharT* high ) const;
protected: (2)
virtual string_type do_transform( const CharT* low, const CharT* high ) const;
1) Public member function, calls the protected virtual member function do_transform of the most derived class.
2) Converts the character sequence [low, high) to a string that, compared lexicographically (e.g. with operator< for strings) with the result of calling transform() on another string, produces the same result as calling do_compare() on the same two strings.
Parameters
low - pointer to the first character in the sequence to transform
high - one past the end pointer for the sequence to transform
Return value
The string transformed so that lexicographic comparison of the transformed strings may be used instead of collating of the originals. In the "C" locale, the returned string is the exact copy of [low, high). In other locales, the contents of the returned string are implementation-defined, and the size may be considerably longer.
Notes
In addition to the use in collation, the implementation-specific format of the transformed string is known to std::regex_traits<>::transform_primary, which is able to extract the equivalence class information.
Example
// Run this code
Output:
See also
strxfrm (function)
wcsxfrm (function)