std::regex_traits::lookup_classname
Da cppreference.com.
< cpp | regex | regex traits
![]() |
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. |
template< class ForwardIt > char_class_type lookup_classname( ForwardIt first, |
||
Se la sequenza di caratteri
[first, last)
rappresenta il nome di una classe di caratteri valido impostazioni internazionali attualmente intriso (cioè la stringa tra [:
:]
e nelle espressioni regolari POSIX), restituisce l'implementazione definita valore che rappresenta questa classe di caratteri. In caso contrario, restituisce 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.
You can help to correct and verify the translation. Click here for instructions.
Se il parametro è
icase
true, la classe di caratteri ignora maiuscole e minuscole, ad esempio, la regex [:lower:]
con std::regex_constants::icase genera una chiamata a regex_traits<>::lookup_classname()
con [first, last)
indica la stringa "lower" e icase == true. Questa chiamata restituisce la maschera di bit come la chiamata generata dal regex [: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.
You can help to correct and verify the translation. Click here for instructions.
Le seguenti classi di caratteri sono sempre riconosciuti, in forme di carattere sia stretto e largo, e le classificazioni restituito (con icase == false) corrispondono alle classificazioni corrispondenti ottenuti dalla sfaccettatura std::ctype del locale intriso, come 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.
You can help to correct and verify the translation. Click here for instructions.
carattere di classe
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 '_' eventualmente aggiunto
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 classificazione tornati per la "w" stringa può essere esattamente la stessa "alnum", nel qual caso
isctype()
aggiunge '_' in modo esplicito.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.
You can help to correct and verify the translation. Click here for instructions.
Indice |
[modifica] Parametri
first, last | - | una coppia di iteratori che determina la sequenza di caratteri che rappresenta il nome di una classe di caratteri
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 è vero, ignora il superiore / distinzione minuscole nella classificazione dei caratteri
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 .
|
[modifica] Valore di ritorno
La maschera di bit che rappresenta la classificazione carattere determinato dalla classe di caratteri dato, oppure zero se la classe è sconosciuta.
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.
You can help to correct and verify the translation. Click here for instructions.
[modifica] Esempio
This section is incomplete Reason: no example |
[modifica] Vedi anche
indica l'appartenenza a una classe di caratteri 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. (metodo pubblico) |