Espaços nominais
Variantes
Acções

std::regex_traits::lookup_classname

Da cppreference.com
< cpp‎ | regex‎ | regex traits

 
 
Biblioteca de expressões regulares
Classes
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
Algoritmos
Original:
Algorithms
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Iteradores
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Exceções
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Características
Original:
Traits
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Constantes
Original:
Constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
 
 
template<class ForwardIt >

char_class_type lookup_classname( ForwardIt first,
                                  ForwardIt last,

                                  bool icase =false)const;
Se a seqüência de caracteres [first, last) representa o nome de uma classe de caracteres válidos na localidade atualmente imbuído (isto é, a corda entre [: e :] em expressões regulares POSIX), retorna a implementação valor definido representando esta classe de personagem. Caso contrário, retorna zero.
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.
Se o parâmetro é icasetrue, a classe de personagem ignora maiúsculas e minúsculas, por exemplo, a regex [:lower:] com std::regex_constants::icase gera uma chamada para regex_traits<>::lookup_classname() com [first, last) indicando a seqüência "lower" e icase ==true. Essa chamada retorna a máscara de bits mesmo que a chamada gerado pelo regex [:alpha:] com 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.
As classes de caracteres a seguir são sempre reconhecidos, em formas de caracteres tanto estreitas e largas, e as classificações devolvido (com icase ==false) correspondem às classificações correspondentes obtidos pelo std::ctype faceta da localidade impregnada, como se segue:
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.
classe de personagem
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 por "_", opcionalmente, acrescentou
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.
A classificação voltou para a cadeia "w" pode ser exatamente o mesmo que "alnum", em que isctype() caso adiciona '_' explicitamente.
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.

Índice

[editar]Parâmetros

first, last -
um par de iteradores que determina a seqüência de caracteres que representa o nome de uma classe 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 -
se for verdade, ignora o superior / distinção em caixa baixa na classificação 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.
Type requirements
-
ForwardIt must meet the requirements of ForwardIterator.

[editar]Valor de retorno

A máscara de bits que representa a classificação de caracteres determinado pela classe determinado personagem, ou zero se a classe é desconhecido.
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]Exemplo

[editar]Veja também

Indica a participação em uma classe de personagem
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.

(função pública membro)
close