Freigeben über


collate::do_transform

A virtual function called to convert a character sequence from a locale to a string that may be used in lexicographical comparisons with other character sequences similarly converted from the same locale.

virtual string_type do_transform( 
   const CharType* _First, 
   const CharType* _Last 
) const;

Parameters

  • _First
    A pointer to the first character in the sequence to be converted.

  • _Last
    A pointer to the last character in the sequence to be converted.

Return Value

A string that is the transformed character sequence.

Remarks

The protected virtual member function returns an object of class string_type whose controlled sequence is a copy of the sequence [_First, _Last). If a class derived from collate<CharType> overrides do_compare, it should also override do_transform to match. When passed to collate::compare, two transformed strings should yield the same result that you would get from passing the untransformed strings to compare in the derived class.

Example

See the example for transform, which calls do_transform.

Requirements

Header: <locale>

Namespace: std

See Also

Reference

collate Class