Varianti

wctomb

Da cppreference.com.

<metanoindex/>

 
 
 
Stringhe multibyte null-terminated
Wide / multibyte conversioni
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
Tipi
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
 
<tbody> </tbody>
Elemento definito nell'header <stdlib.h>
int wctomb( char* s, wchar_t wc );
Converte un wc ampio carattere multibyte di codifica e memorizza (comprese le sequenze di cambio) in array di caratteri il cui primo elemento è puntato da s. Non più di caratteri MB_CUR_MAX vengono memorizzati.
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 è il carattere null, il byte null viene scritto s, preceduta da tutte le sequenze di trasferimento necessarie per ripristinare lo stato iniziale del cambio.
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 è un puntatore nullo, ripristina lo stato di conversione globale e determina se le sequenze di trasferimento vengono usati.
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.

Note

Ogni chiamata agli aggiornamenti wctomb lo stato interno di conversione globale (un oggetto statico di mbstate_t tipo, noto solo a questa funzione). Se la codifica multibyte utilizza spostamento stati, questa funzione non è rientrante. In ogni caso, più thread non dovrebbe chiamare wctomb senza sincronizzazione: wcrtomb può essere utilizzato.
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.

Parametri

s -
puntatore alla matrice di caratteri per l'output
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 -
carattere esteso da convertire
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.

Valore di ritorno

Se s non è un puntatore nullo, restituisce il numero di byte che sono contenute nella rappresentazione multibyte di wc o -1 wc se non è un carattere valido.
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 è un puntatore nullo, consente di ripristinare il suo stato conversione interna per rappresentare lo stato iniziale del cambio e 0 restituisce se la codifica multibyte corrente non è dipendente dallo stato (non utilizza sequenze di trasferimento) o un valore diverso da zero se la codifica multibyte corrente è dipendente dallo stato (utilizza sequenze di trasferimento).
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.

Esempio

Vedi anche

converte il carattere successivo multibyte a carattere esteso
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.

(funzione) [modifica]
converte un carattere esteso alla sua rappresentazione multibyte, determinato stato
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.

(funzione) [modifica]