std::regex_traits::length
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. |
static std::size_t length(const char_type* p); |
||
Calcola la lunghezza di un null-terminated sequenza di caratteri, cioè, la più piccola in modo tale che
i
p[i]==0.Original:
Calculates the length of a null-terminated character sequence, that is, the smallest
i
such that p[i]==0.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.
specializzazioni libreria standard di std::regex_traits eseguire std::char_traits<CharT>::length(p);....
Original:
Standard library specializations of std::regex_traits execute std::char_traits<CharT>::length(p);
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] Parametri
p | - | puntatore al primo elemento della terminazione null sequenza di caratteri
Original: pointer to the first element of the null-terminated character sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[modifica] Valore di ritorno
La lunghezza della stringa con terminazione null di caratteri.
Original:
The length of the null-terminated character string.
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
#include <regex> #include <iostream> int main() { std::cout << std::regex_traits<char>::length(u8"Кошка") << '\n' << std::regex_traits<wchar_t>::length(L"Кошка") << '\n'; }
Output:
10 5