Namespace
Varianti

mbrtowc

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

 
 
 
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
 
Defined in header <wchar.h>
size_t mbrtowc( wchar_t* pwc, const char* s, size_t n, mbstate_t* ps );
Converte un carattere multibyte stretto a un carattere ampio.
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 non è un puntatore nullo, controlla la maggior parte a byte n della stringa di caratteri multibyte, a cominciare con il byte puntato da s per determinare il numero di byte necessari per completare il carattere successivo multibyte (incluse le sequenze di cambio). Se la funzione determina che il carattere multibyte successivo s sia completo e valido, lo converte il carattere corrispondente ampia e lo memorizza in *pwc (se pwc non è nullo).
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 è un puntatore nullo, i valori di n e pwc vengono ignorati e chiamata è 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 il carattere largo prodotto è il carattere nullo, lo stato di conversione memorizzate nel *ps è lo stato iniziale del cambio.
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.

Indice

[modifica] Parametri

pwc -
puntatore nella posizione in cui il personaggio risultante gamma verrà scritto
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 -
puntatore alla stringa di caratteri multibyte utilizzati come input
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 -
limitare il numero di byte in s che può essere esaminato
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 -
puntatore allo stato di conversione quando si interpreta la stringa 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.

[modifica] Valore di ritorno

La prima delle seguenti che vale:
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 il carattere convertito da s (e conservato in pwc se non nullo) è stato il carattere null
    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.
  • il numero di byte [1...n] del carattere multibyte correttamente convertito da 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 i byte n prossimi costituiscono un incompleto, ma finora valido, caratteri multibyte. Nulla è scritto *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 si verifica errore di codifica. Nulla viene scritto *pwc, il EILSEQ valore viene memorizzato nella errno e il valore di *ps è lasciato non specificato.
    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.

[modifica] Esempio

[modifica] 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) [edit]
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) [edit]
C++ documentation for mbrtowc