std::wcslen
De cppreference.com
![]() |
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í. |
Definido en el archivo de encabezado <cwchar>
|
||
std::size_t wcslen( const wchar_t *str ); |
||
Devuelve la longitud de una cadena de ancho, que es el número de caracteres que no son nulos de ancho que preceden al carácter nulo de terminación de ancho .
Original:
Returns the length of a wide string, that is the number of non-null wide characters that precede the terminating null wide character.
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.
Contenido |
[editar] Parámetros
str | - | puntero a la cadena gama terminada en nulo que se examinará
Original: pointer to the null-terminated wide string to be examined 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 ancho terminada en nulo
str
.Original:
The length of the null-terminated wide string
str
.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 <iostream> #include <cwchar> int main() { const wchar_t* str = L"Hello, world!"; std::wcout << "The length of L\"" << str << "\" is " << std::wcslen(str) << '\n'; }
Salida:
The length of L"Hello, world!" is 13
[editar] Ver también
Documentación de C para wcslen
|