std::sub_match
De 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. |
Defined in header <regex>
|
||
template< class BidirIt |
(desde C++11) | |
El
sub_match
plantilla de clase es utilizada por el motor de expresiones regulares para denotar secuencias de caracteres coincidentes por una marcada sub-expresiones .Original:
The class template
sub_match
is used by the regular expression engine to denote sequences of characters matched by marked sub-expressions.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.
Un partido es un par
[begin, end)
dentro del rango meta coincide con la expresión regular, pero con funciones de observación adicionales para mejorar la claridad del código .Original:
A match is a
[begin, end)
pair within the target range matched by the regular expression, but with additional observer functions to enhance code clarity.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.
Sólo el constructor por defecto es de acceso público. Las instancias de
sub_match
se construyen normalmente y se rellena como una parte de un contenedor std::match_results durante el procesamiento de uno de los algoritmos de expresiones regulares .Original:
Only the default constructor is publicly accessible. Instances of
sub_match
are normally constructed and populated as a part of a std::match_results container during the processing of one of the regex 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.
Las funciones miembro definidas devolver los valores predeterminados a menos que el miembro matched es
true
.Original:
The member functions return defined default values unless the matched member is
true
.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.
sub_match
hereda de std::pair<BidirIt, BidirIt>, aunque no puede ser tratado como un objeto std::pair porque las funciones de miembro como de intercambio y cesión no funciona como se esperaba .Original:
sub_match
inherits from std::pair<BidirIt, BidirIt>, although it cannot be treated as a std::pair object because member functions such as swap and assignment will not work as expected.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.
Contenido |
[editar] Tipo de requisitos
-BidirIt must meet the requirements of BidirectionalIterator .
|
[editar] Especializaciones
Varias especializaciones comunes para los tipos de caracteres de secuencia se disponía:
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 |
csub_match
|
sub_match<const char*> |
wcsub_match
|
sub_match<const wchar_t*> |
ssub_match
|
sub_match<std::string::const_iterator> |
wssub_match
|
sub_match<std::wstring::const_iterator> |
[editar] Tipos de miembros
Miembro de tipo
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 |
iterator
|
BidirIt |
value_type
|
std::iterator_traits<BidirIt>::value_type |
difference_type
|
std::iterator_traits<BidirIt>::difference_type |
string_type
|
std::basic_string<value_type> |
[editar] Objetos miembros
matched
|
Indica si este partido fue un éxito .
Original: Indicates if this 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. |
Inherited from std::pair
first
|
Inicio de la secuencia partido .
Original: Start of the match sequence. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
second
|
One-past-the-final de la secuencia partido .
Original: One-past-the-end of the match sequence. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[editar] Las funciones miembro
construye el objeto partido Original: constructs the match object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro público función) | |
Original: Observers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
devuelve la longitud de la coincidencia (si la hay) Original: returns the length of the match (if any) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro público función) | |
se convierte en el tipo de cadena subyacente Original: converts to the underlying string type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro público función) | |
compara subsecuencia emparejado (si los hay) Original: compares matched subsequence (if any) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro público función) |
[editar] Terceros funciones
lexicográficamente compara los valores en el recipiente Original: lexicographically compares the values in the container The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función) | |
Salidas de la subsecuencia carácter coincidente Original: outputs the matched character subsequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función de plantilla) |
[editar] Ver también
(C++11) |
recorre subcoincidencias expresiones regulares Original: iterates through regex submatches The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de plantilla) |