Espaços nominais
Variantes
Acções

mbrtowc

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

 
 
 
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.
mbsinit
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.
mbstate_t
 
Defined in header <wchar.h>
size_t mbrtowc( wchar_t* pwc, const char* s, size_t n, mbstate_t* ps );
Converte um caractere multibyte estreita para um caractere largo.
Original:
Converts a narrow multibyte character to a wide character.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se s não é um ponteiro nulo, inspeciona a maioria dos bytes n da cadeia de caracteres multibyte, começando com o byte apontado pelo s para determinar o número de bytes necessários para completar o personagem multibyte seguinte (incluindo as seqüências de turnos). Se a função determina que o caráter de multibyte próximo s é completa e válida, converte-lo para o personagem correspondente de largura e armazena em *pwc (se pwc não é nulo).
Original:
If s is not a null pointer, inspects at most n bytes of the multibyte character string, beginning with the byte pointed to by s to determine the number of bytes necessary to complete the next multibyte character (including any shift sequences). If the function determines that the next multibyte character in s is complete and valid, converts it to the corresponding wide character and stores it in *pwc (if pwc is not null).
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, os valores de n e pwc chamada são ignorados e é equivalente a mbrtowc(NULL, "", 1, ps).
Original:
If s is a null pointer, the values of n and pwc are ignored and call is equivalent to mbrtowc(NULL, "", 1, ps).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se o personagem de largura produzida é o caractere nulo, o estado de conversão armazenado em *ps é o estado deslocamento inicial.
Original:
If the wide character produced is the null character, the conversion state stored in *ps is the initial shift state.
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

pwc -
ponteiro para o local onde o personagem largo resultante será escrito
Original:
pointer to the location where the resulting wide character will be written
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
s -
ponteiro para a cadeia de caracteres multibyte usado como entrada
Original:
pointer to the multibyte character string used as input
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.
ps -
ponteiro para o estado de conversão utilizado ao interpretar a string multibyte
Original:
pointer to the conversion state used when interpreting the multibyte string
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 primeiro dos seguintes que se aplica:
Original:
The first of the following that applies:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • 0 se o personagem convertido de s (e armazenados na pwc se não nulo) foi o caractere nulo
    Original:
    0 if the character converted from s (and stored in pwc if non-null) was the null character
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • o número de bytes [1...n] do caractere multibyte convertidos com êxito a partir de s
    Original:
    the number of bytes [1...n] of the multibyte character successfully converted from s
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (size_t)-2 se os bytes n próximos constituem um incompleta, mas até agora válida personagem, multibyte. Nada é escrito para *pwc.
    Original:
    (size_t)-2 if the next n bytes constitute an incomplete, but so far valid, multibyte character. Nothing is written to *pwc.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (size_t)-1 se ocorre erro de codificação. Nada é escrito para *pwc, o EILSEQ valor é armazenado no errno e o valor de *ps é deixado indeterminado.
    Original:
    (size_t)-1 if encoding error occurs. Nothing is written to *pwc, the value EILSEQ is stored in errno and the value of *ps is left unspecified.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[editar] Exemplo

[editar] Veja também

converte o caractere multibyte ao lado de caracteres largos
Original:
converts the next multibyte character to wide character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
converte um caractere largo em sua representação multibyte, determinado estado
Original:
converts a wide character to its multibyte representation, given state
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
C++ documentation for mbrtowc