Espaços nominais
Variantes
Acções

std::mblen

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

 
 
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.
 
Strings terminadas multibyte
Wide / multibyte conversões
Original:
Wide/multibyte conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tipos
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Definido no cabeçalho <cstdlib>
int mblen( const char* s, std::size_t n );
Determina o tamanho, em bytes, do caráter de multibyte cujo primeiro byte é apontado por s.
Original:
Determines the size, in bytes, of the multibyte character whose first byte is pointed to by s.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se s é um ponteiro nulo, redefine o estado de conversão global e determinado se as sequências de deslocamento são usados ​​.
Original:
If s is a null pointer, resets the global conversion state and determined whether shift sequences are used.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Esta função é equivalente à std::mbtowc((wchar_t*)0, s, n) chamada, com excepção de que a conversão do estado std::mbtowc não é afectada.
Original:
This function is equivalent to the call std::mbtowc((wchar_t*)0, s, n), except that conversion state of std::mbtowc is unaffected.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Índice

[editar] Notas

Cada chamada para atualizações mblen do estado conversão interna global (um objeto estático de std::mbstate_t tipo, conhecida apenas para esta função). Se a codificação multibyte usa os estados de mudança, os cuidados devem ser tomados para evitar varreduras retrocesso ou múltipla. Em todo o caso, vários segmentos não deve chamar mblen sem sincronização: std::mbrlen pode ser usado em vez.
Original:
Each call to mblen updates the internal global conversion state (a static object of type std::mbstate_t, only known to this function). If the multibyte encoding uses shift states, care must be taken to avoid backtracking or multiple scans. In any case, multiple threads should not call mblen without synchronization: std::mbrlen may be used instead.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Parâmetros

s -
ponteiro para o caractere multibyte
Original:
pointer to the multibyte character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
n -
limitar o número de bytes em s que podem ser examinados
Original:
limit on the number of bytes in s that can 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

Se s não é um ponteiro nulo, retorna o número de bytes que estão contidos no caráter multibyte ou -1 se os primeiros bytes apontado por s não formam um caractere multibyte válido ou 0 se s está apontando para a charcter nulo '\0'.
Original:
If s is not a null pointer, returns the number of bytes that are contained in the multibyte character or -1 if the first bytes pointed to by s do not form a valid multibyte character or 0 if s is pointing at the null charcter '\0'.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click