template< class ForwardIt >
string_type transform( ForwardIt first, ForwardIt last) const;
Obtains the sort key for the character sequence [first, last), such that if a sort key compares less than another sort key with operator<, then the character sequence that produced the first sort key comes before the character sequence that produced the second sort key, in the currently imbued locale's collation order.
For example when the regex flag std::regex_constants::collate is set,