Espacios de nombres
Variantes

std::wcslen

De cppreference.com
 
 
 
 
<tbody> </tbody>
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.

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.

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.

Ejemplo

#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

Ver también