std::wcslen
Da cppreference.com.
![]() | 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. |
Elemento definito nell'header <cwchar> | ||
std::size_t wcslen(constwchar_t*str ); | ||
Restituisce la lunghezza di una stringa di larghezza, che è il numero di caratteri di larghezza non Null che precedono il carattere nullo finale ampio.
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.
Indice |
[modifica]Parametri
str | - | puntatore alla stringa con terminazione null larga da esaminare 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. |
[modifica]Valore di ritorno
La lunghezza della stringa con terminazione null largo
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.
[modifica]Esempio
#include <iostream>#include <cwchar>int main(){constwchar_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
[modifica]Vedi anche
C documentation for wcslen |