cpp/regex/match results/str: differenze tra le versioni
Da cppreference.com.
< cpp | regex | match results
m (r2.7.3) (Bot: Aggiungo de, en, es, fr, ja, pt, ru, zh) |
m (Use {{lc}}. Update links. Various fixes.) |
||
Riga 17: | Riga 17: | ||
===Parametri=== | ===Parametri=== | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{| n |{{tr| numero intero che specifica che corrispondono a tornare| integral number specifying which match to return}}}} |
− | {{ | + | {{end}} |
===Valore di ritorno=== | ===Valore di ritorno=== | ||
Riga 45: | Riga 45: | ||
===Vedi anche=== | ===Vedi anche=== | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{| cpp/regex/match_results/operator_at}} |
− | {{ | + | {{end}} |
[[de:cpp/regex/match results/str]] | [[de:cpp/regex/match results/str]] |
Versione attuale delle 14:59, 2 lug 2013
![]() |
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
string_type str( size_type n = 0 ) const; |
(dal C++11) | |
Restituisce una stringa che rappresenta l'indicata sub-partita.
Original:
Returns a string representing the indicated sub-match.
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.
Se n == 0, una stringa che rappresenta l'espressione intera corrispondenza viene restituito.
Original:
If n == 0, a string representing entire matched expression is returned.
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.
Se n > 0 && n < size(), una stringa che rappresenta n ° sub-partita viene restituito.
Original:
If n > 0 && n < size(), a string representing nth sub-match is returned.
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.
se n >= size(), una stringa che rappresenta l'incontro senza pari viene restituito.
Original:
if n >= size(), a string representing the unmatched match is returned.
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.
La chiamata è equivalente a string_type((*this)[n]);
Original:
The call is equivalent to string_type((*this)[n]);
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.
Indice |
[modifica] Parametri
n | - | numero intero che specifica che corrispondono a tornare
Original: integral number specifying which match to return The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[modifica] Valore di ritorno
Restituisce una stringa che rappresenta la partita specificato o della partita sub.
Original:
Returns a string representing the specified match or sub match.
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.
[modifica] Esempio
#include <iostream> #include <regex> #include <string> int main() { std::regex re("a(a)*b"); std::string target("aaab"); std::smatch sm; std::regex_match(target, sm, re); std::cout << sm.str(1) << '\n'; }
Output:
aaa
[modifica] Vedi anche
rendimenti indicati sub-partita Original: returns specified sub-match The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (metodo pubblico) |