Espaços nominais
Variantes
Acções

wcrtomb

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 wcrtomb( char* s, wchar_t wc, mbstate_t* ps);
Converte um caractere largo em sua representação multibyte estreita.
Original:
Converts a wide character to its narrow multibyte representation.
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, a função determina o número de bytes necessários para armazenar a representação de caracteres multibyte de wc (incluindo as seqüências de deslocamento), e armazena a representação de caracteres multibyte na matriz de caracteres cujo primeiro elemento é apontado por s. Na maioria dos bytes MB_CUR_MAX pode ser escrito por esta função.
Original:
If s is not a null pointer, the function determines the number of bytes necessary to store the multibyte character representation of wc (including any shift sequences), and stores the multibyte character representation in the character array whose first element is pointed to by s. At most MB_CUR_MAX bytes can be written by this function.
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, a chamada é equivalente a wcrtomb(buf, L'\0', ps) por algum buf buffer interno.
Original:
If s is a null pointer, the call is equivalent to wcrtomb(buf, L'\0', ps) for some internal buffer buf.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se wc é o L'\0' caractere nulo de largura, um byte nulo é armazenado, precedida de qualquer seqüência de mudança necessário para restaurar o estado do deslocamento inicial ea conversão *ps parâmetro de estado é atualizado para representar o estado deslocamento inicial.
Original:
If wc is the null wide character L'\0', a null byte is stored, preceded by any shift sequence necessary to restore the initial shift state and the conversion state parameter *ps is updated to represent 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

s -
ponteiro para matriz de caracteres estreita onde o personagem multibyte será armazenado
Original:
pointer to narrow character array where the multibyte character will be stored
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
wc -
o caráter amplo para converter
Original:
the wide character to convert
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 objeto de estado de conversão utilizado ao interpretar a string multibyte
Original:
pointer to the conversion state object 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

Em caso de sucesso, retorna o número de bytes (incluindo as seqüências de turnos) escrito para a matriz de caracteres cujo primeiro elemento é apontado por s.
Original:
On success, returns the number of bytes (including any shift sequences) written to the character array whose first element 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.
Em caso de falha (wc não é um caractere válido de largura), retorna (size_t)-1, lojas EILSEQ em errno e deixa *ps em estado indeterminado.
Original:
On failure (if wc is not a valid wide character), returns (size_t)-1, stores EILSEQ in errno, and leaves *ps in unspecified state.
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 um caractere largo em sua representação multibyte
Original:
converts a wide character to its multibyte representation
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 o caractere multibyte ao lado de caráter amplo, determinado estado
Original:
converts the next multibyte character to wide character, 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 wcrtomb