Espacios de nombres
Variantes
Acciones

std::regex_traits::lookup_classname

De cppreference.com
< cpp‎ | regex‎ | regex traits
 
 
Biblioteca de expresiones regulares
Clases
(C++11)
Algoritmos
Iteradores
Excepciones
Rasgos
Constantes
(C++11)
Gramática de las expresiones regulares
 
 
template<class ForwardIt >

char_class_type lookup_classname( ForwardIt first,
                                  ForwardIt last,

                                  bool icase =false)const;
Si la secuencia de caracteres [first, last) representa el nombre de una clase de caracteres válidos en el entorno local actualmente impregnado (es decir, la cadena entre [: y :] en expresiones regulares POSIX), devuelve el definido por la implantación valor que representa esta clase de caracteres. De lo contrario, devuelve cero .
Original:
If the character sequence [first, last) represents the name of a valid character class in the currently imbued locale (that is, the string between [: and :] in POSIX regular expressions), returns the implementation-defined value representing this character class. Otherwise, returns zero.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Si el parámetro es icasetrue, la clase de caracteres ignora mayúsculas y minúsculas, por ejemplo, la expresión regular [:lower:] con std::regex_constants::icase genera una llamada a regex_traits<>::lookup_classname() con [first, last) indica la cadena "lower" y icase ==true. Esta llamada devuelve la máscara de bits igual a la llamada generado por la expresión regular [:alpha:] con icase ==false .
Original:
If the parameter icase is true, the character class ignores character case, e.g. the regex [:lower:] with std::regex_constants::icase generates a call to regex_traits<>::lookup_classname() with [first, last) indicating the string "lower" and icase ==true. This call returns the same bitmask as the call generated by the regex [:alpha:] with icase ==false.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Las siguientes clases de caracteres son reconocidos, en formas tanto de carácter estrechos y anchos, y devolvió las clasificaciones (con icase ==false) corresponden a las clasificaciones obtenidas por el juego std::ctype faceta de la configuración regional imbuida de la siguiente manera:
Original:
The following character classes are always recognized, in both narrow and wide character forms, and the classifications returned (with icase ==false) correspond to the matching classifications obtained by the std::ctype facet of the imbued locale, as follows:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
carácter de clase
Original:
character class
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::ctype classification
"alnum"std::ctype_base::alnum
"alpha"std::ctype_base::alpha
"blank"std::ctype_base::blank
"cntrl"std::ctype_base::cntrl
"digit"std::ctype_base::digit
"graph"std::ctype_base::graph
"lower"std::ctype_base::lower
"print"std::ctype_base::print
"punct"std::ctype_base::punct
"space"std::ctype_base::space
"upper"std::ctype_base::upper
"xdigit"std::ctype_base::xdigit
"d"std::ctype_base::digit
"s"std::ctype_base::space
"w"
std::ctype_base::alnum con '_' añade opcionalmente
Original:
std::ctype_base::alnum with '_' optionally added
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
La clasificación devuelve para el "w" cadena puede ser exactamente el mismo que "alnum", en el que isctype() caso añade '_' explícitamente .
Original:
The classification returned for the string "w" may be exactly the same as "alnum", in which case isctype() adds '_' explicitly.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Contenido

[editar]Parámetros

first, last -
un par de iteradores que determina la secuencia de caracteres que representa el nombre de una clase de caracteres
Original:
a pair of iterators which determines the sequence of characters that represents a name of a character class
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
icase -
si es cierto, ignora la parte superior / inferior distinción caso de la clasificación de caracteres
Original:
if true, ignores the upper/lower case distinction in the character classification
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Requisitos de tipo
-
ForwardIt debe reunir los requerimientos de ForwardIterator.

[editar]Valor de retorno

La máscara de bits que representa la clasificación de caracteres determinado por la clase de caracteres dado, o cero si la clase es desconocida .
Original:
The bitmask representing the character classification determined by the given character class, or zero if the class is unknown.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar]Ejemplo

[editar]Ver también

indica la pertenencia a una clase de caracteres
Original:
indicates membership in a character class
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función miembro pública)
close