Espaços nominais
Variantes
Ações

wctomb

De cppreference.com

<metanoindex/>

 
 
 
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.
 
<tbody> </tbody>
Definido no cabeçalho <stdlib.h>
int wctomb( char* s, wchar_t wc );
Converte um wc caráter amplo para multibyte codificação e armazena (incluindo as seqüências de deslocamento) na matriz de char cujo primeiro elemento é apontado por s. Não mais do que personagens MB_CUR_MAX são armazenados.
Original:
Converts a wide character wc to multibyte encoding and stores it (including any shift sequences) in the char array whose first element is pointed to by s. No more than MB_CUR_MAX characters are stored.
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 personagem nulo, o byte nulo é escrito para s, precedido por quaisquer sequências de mudança necessárias para restaurar o estado de deslocamento inicial.
Original:
If wc is the null character, the null byte is written to s, preceded by any shift sequences necessary to restore 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.
Se s é um ponteiro nulo, redefine o estado de conversão global e determina se as sequências de deslocamento são usados ​​.
Original:
If s is a null pointer, resets the global conversion state and determines 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.

Notas

Cada chamada para atualizações wctomb do estado conversão interna global (um objeto estático de mbstate_t tipo, conhecida apenas para esta função). Se a codificação multibyte usa estados mudança, esta função não é reentrante. Em todo o caso, vários segmentos não deve chamar wctomb sem sincronização: wcrtomb pode ser usado em vez.
Original:
Each call to wctomb updates the internal global conversion state (a static object of type mbstate_t, only known to this function). If the multibyte encoding uses shift states, this function is not reentrant. In any case, multiple threads should not call wctomb without synchronization: wcrtomb 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.

Parâmetros

s -
ponteiro para a matriz de caracteres para a saída
Original:
pointer to the character array for output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
wc -
caracteres largos para converter
Original:
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.

Valor de retorno

Se s não é um ponteiro nulo, retorna o número de bytes que estão contidos na representação de vários bytes de wc ou -1 se wc não é um caractere válido.
Original:
If s is not a null pointer, returns the number of bytes that are contained in the multibyte representation of wc or -1 if wc is not a valid 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 é um ponteiro nulo, redefine seu estado conversão interna para representar o estado deslocamento inicial e 0 retorna se a codificação multibyte atual não é dependente do estado (não usar seqüências de turnos) ou um valor diferente de zero se a codificação multibyte atual é estado-dependente (utiliza seqüências turnos).
Original:
If s is a null pointer, resets its internal conversion state to represent the initial shift state and returns 0 if the current multibyte encoding is not state-dependent (does not use shift sequences) or a non-zero value if the current multibyte encoding is state-dependent (uses shift sequences).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Exemplo

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]