public member function


template <class ForwardIterator>
  string_type transform_primary (ForwardIterator first, ForwardIterator last) const;
Transform string to primary sort key
Returns a string with a primary sort key that represents the character sequence between first and last in a case-insensitive manner.

For the standard regex_traits, the function returns a string with a primary sort key for the character sequence if the locale's collate mechanism can produce a recognized primary sort key, otherwise it returns an empty string.

This function is called when a regular expression needs to match a primary equivalence class against a character: As a primary sort key the value returned by this function is expected to be categorized considering only primary character shape, without taking into account case, accentation or other locale-specifics.


first, last
Forward iterators to the initial and final positions in a sequence of characters. The range used is [first,last), which includes all the characters between first and last, including the character pointed by first but not the character pointed by last.

Return value

The string transformation of the sequence of characters, independent of case.
string_type is a member type, alias of its corresponding string type. In regex_traits it is an alias of the basic_string with the same template parameter (e.g., string for regex_traits<char>).

See also