std::match_results
Da cppreference.com
![]() | 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. |
Definido no cabeçalho <regex> | ||
template< class BidirIt, | (desde C++11) | |
O std::match_results modelo de classe contém uma coleção de sequências de caracteres que representam o resultado de uma expressão regular.
Original:
The class template std::match_results holds a collection of character sequences that represent the result of a regular expression 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.
Este é um recipiente alocador-aware especializado. Ela só pode ser padrão criadas ou modificadas, passando a std::regex_search() ou algoritmos std::regex_match().
Original:
This is a specialized allocator-aware container. It can only be default created or modified by passing to the std::regex_search() or std::regex_match() algorithms.
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.
O primeiro sub_match (índice 0) contido em um match_result representa sempre o jogo inteiro dentro de uma seqüência alvo feito por um regex, e sub_matches subseqüentes representam sub-expressão correspondências em seqüência para o parêntese esquerdo delimitando a expressão sub-no regex.
Original:
The first sub_match (index 0) contained in a match_result always represents the full match within a target sequence made by a regex, and subsequent sub_matches represent sub-expression matches corresponding in sequence to the left parenthesis delimiting the sub-expression in the regex.
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.
[editar]Requisitos de tipo
-BidirIt must meet the requirements of BidirectionalIterator . | ||
-Alloc must meet the requirements of Allocator . |
[editar]Especializações
Várias especializações para tipos de seqüência de caracteres comuns são fornecidos:
Original:
Several specializations for common character sequence types are provided:
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.
Defined in header <regex> | |
Tipo Original: Type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | Definition |
cmatch | match_results<constchar*> |
wcmatch | match_results<constwchar_t*> |
smatch | match_results<std::string::const_iterator> |
wsmatch | match_results<std::wstring::const_iterator> |
[editar]Tipos de membro
Tipo de membro Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | Definition |
allocator_type | Allocator |
value_type | std::sub_match<BidirIt> |
const_reference | const value_type& |
reference | const_reference |
const_iterator | Implementação' definida (depende do recipiente subjacente) Original: implementation defined (depends on the underlying container) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
iterator | const_iterator |
difference_type | std::iterator_traits<BidirIt>::difference_type |
size_type | std::allocator_traits<Alloc>::size_type |
char_type | std::iterator_traits<BidirIt>::value_type |
string_type | std::basic_string<char_type> |
[editar]Funções de membro
Constrói o objeto Original: constructs the object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
destrói o objeto Original: destructs the object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
atribui o conteúdo Original: assigns the contents The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
retorna o alocador de associado Original: returns the associated allocator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
Original: State The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(função pública membro) | |
Original: Size The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
verifica se o jogo foi bem sucedida Original: checks whether the match was successful The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
retorna o número de partidas em um estado resultado totalmente estabelecida Original: returns the number of matches in a fully-established result state The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
retorna o número máximo possível de sub-jogos Original: returns the maximum possible number of sub-matches The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
Original: Element access The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
retorna o comprimento do particular sub-jogo Original: returns the length of the particular sub-match The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
retorna a posição do primeiro caractere do particular sub-jogo Original: returns the position of the first character of the particular sub-match The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
retorna a seqüência de caracteres para o jogo sub-particular Original: returns the sequence of characters for the particular sub-match The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
retornos especificados sub-jogo 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. (função pública membro) | |
retornos sub-sequências, entre o início da sequência alvo e o início da partida completa . Original: returns sub-sequence between the beginning of the target sequence and the beginning of the full match. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
retornos sub-sequências, entre o final do jogo completo e o fim da sequência alvo Original: returns sub-sequence between the end of the full match and the end of the target sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
Original: Iterators The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
retorna iterador para o início da lista de sub-partidas Original: returns iterator to the beginning of the list of sub-matches The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
retorna iterador para o fim da lista de sub-partidas Original: returns iterator to the end of the list of sub-matches The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
Original: Format The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
formats match results for output (função pública membro) | |
Original: Modifiers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Trocar o conteúdo Original: swaps the contents The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) |
[editar]Não-membros funções
lexicographically compara os valores em dois o resultado da partida Original: lexicographically compares the values in the two match result The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de função) | |
o algoritmo especializado std::swap() Original: specializes the std::swap() algorithmThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de função) |