std::mblen
Da cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
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.
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.
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.
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.
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
You can help to correct and verify the translation. Click