Espaços nominais
Variantes
Acções

std::wcslen

Da cppreference.com
< cpp‎ | string‎ | wide

 
 
Biblioteca cordas
Strings terminadas
Original:
Null-terminated strings
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Cadeias de bytes
Multibyte cordas
Cordas de largura
Classes
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string
char_traits
 
Strings terminadas largura
Funções
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Manipulação personagem
Original:
Character manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Conversões para formatos numéricos
Original:
Conversions to numeric formats
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Manipulação de cadeia
Original:
String manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Manipulação matriz
Original:
Array manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
wmemcpy
wmemmove
wmemcmp
wmemchr
wmemset
 
Defined in header <cwchar>
std::size_t wcslen( const wchar_t *str );
Retorna o comprimento de uma corda de largura, que é o número de não-nulos caracteres largos que precedem o caractere nulo de terminação de largura.
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.

Índice

[editar] Parâmetros

str -
ponteiro para a string terminada em null larga para ser examinado
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

O comprimento da string terminada em null ampla 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.

[editar] Exemplo

#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';
}

Output:

The length of L"Hello, world!" is 13

[editar] Veja também

C documentation for wcslen