std::regex_traits::transform
De cppreference.com
< cpp | regex | regex traits
![]() | This page has been machine-translated from the English version of the wiki using Google Translate. The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
template<class ForwardIt > string_type transform( ForwardIt first, ForwardIt last)const | ||
Obtient la clé de tri pour la séquence de caractères
[first, last)
, de sorte que si une clé de tri compare inférieure à une autre clé de tri avec operator<, la séquence de caractères qui a produit la première clé de tri vient avant la séquence de caractères qui a produit la deuxième clé de tri, dans le cours ordre de classement locale imprégnée de .Original:
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.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Par exemple, lorsque le drapeau std::regex_constants::collate regex est définie, alors la séquence
[a-b]
correspondrait à un certain caractère c1
si traits.transform("a")<= traits.transform(c1)<= traits.transform("b"). Notez que cette fonction prend une chaîne de caractères comme argument pour accueillir les plages définies comme [[.ae.]-d] .Original:
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 accomodate to the ranges defined like [[.ae.]-d].The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Spécialisations de la bibliothèque standard de std::regex_traits retour std::use_facet<std::collate<CharT>>(getloc()).transform(&*str.begin(), &*str.begin()+ str.length()) pour une chaîne temporaire
str
construit comme string_type str(first, last) .Original:
Standard library specializations of std::regex_traits return std::use_facet<std::collate<CharT>>(getloc()).transform(&*str.begin(), &*str.begin()+ str.length()) for some temporary string
str
constructed as string_type str(first, last).The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifier]Paramètres
first, last | - | une paire de ForwardIterator s qui détermine la séquence de caractères à comparerOriginal: a pair of ForwardIterator s which determines the sequence of characters to compareThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Type requirements | ||
-ForwardIt must meet the requirements of ForwardIterator . |
[modifier]Retourne la valeur
La clé de classement pour la
[first, last)
séquence de caractères dans la locale courante imprégné .Original:
The collation key for the character sequence
[first, last)
in the currently imbued locale.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifier]Exemple
This section is incomplete Reason: no example |