A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../regex/regex_traits/transform.html below:

std::regex_traits<CharT>::transform - cppreference.com

template< class ForwardIt >
string_type transform( ForwardIt first, ForwardIt last) const;

Obtains the sort key for the character sequence [firstlast), 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, then the sequence [a-b] would match some character c1 if traits.transform("a") <= traits.transform(c1) <= traits.transform("b"). Note that this function takes a character sequence as the argument to accommodate to the ranges defined like [[.ae.]-d].

Standard library specializations of std::regex_traits return std::use_facet<std::collate<CharT>>(getloc()).transform(str.data(), str.data() + str.length()) for some temporary string str constructed as string_type str(first, last).

[edit] Parameters [edit] Return value

The collation key for the character sequence [firstlast) in the currently imbued locale.

[edit] Example

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4