std::regex_traits::length
De cppreference.com
< cpp | regex | regex traits
![]() | Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate. La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
staticstd::size_t length(const char_type* p); | ||
Calcula la longitud de una secuencia de caracteres terminada en nulo, es decir, el más pequeño de tal manera que
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.
especializaciones biblioteca estándar de std::regex_traits ejecutar 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.
[editar]Parámetros
p | - | puntero al primer elemento de la secuencia de caracteres terminada en nulo 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. |
[editar]Valor de retorno
La longitud de la cadena de caracteres terminada en cero .
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.
[editar]Ejemplo
Ejecuta este código
#include <regex>#include <iostream> int main(){std::cout<<std::regex_traits<char>::length(u8"Кошка")<<'\n'<<std::regex_traits<wchar_t>::length(L"Кошка")<<'\n';}
Salida:
10 5