Namespace
Varianti

std::mbrtoc16

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

 
 
Stringhe libreria
Null-stringhe terminate
Original:
Null-terminated strings
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Byte stringhe
Multibyte stringhe
Stringhe larghe
Classi
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string
char_traits
 
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 <cuchar>
std::size_t mbrtoc16( char16_t* pc16,

                      const char* s,
                      std::size_t n,

                      std::mbstate_t* ps );
(dal C++11)
Converte un carattere stretto multibyte a 16-bit di rappresentazione dei caratteri (tipicamente, UTF-16).
Original:
Converts a narrow multibyte character to 16-bit character representation (typically, UTF-16).
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 in s sia completo e valido, converte il corrispondente carattere a 16 bit e la memorizza nella *pc16 (pc16 se 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 16-bit character and stores it in *pc16 (if pc16 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 il carattere multibyte in *s corrisponde a un multi-char16_t sequenza (ad esempio, una coppia di surrogati in UTF-16), poi, dopo la prima chiamata a questa funzione, *ps viene aggiornato in modo tale che la chiamata successiva a mbrtoc16 scriverà il char16_t supplementare, senza considerare *s.
Original:
If the multibyte character in *s corresponds to a multi-char16_t sequence (e.g. a surrogate pair in UTF-16), then after the first call to this function, *ps is updated in such a way that the next call to mbrtoc16 will write out the additional char16_t, without considering *s.
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 pc16 vengono ignorate e la chiamata è equivalente a std::mbrtoc16(NULL, "", 1, ps).
Original:
If s is a null pointer, the values of n and pc16 are ignored and the call is equivalent to std::mbrtoc16(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, la conversione *ps stato rappresenta lo stato iniziale del cambio.
Original:
If the wide character produced is the null character, the conversion state *ps represents 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 il __STDC_UTF_16__ macro viene definita, la codifica a 16 bit utilizzata da questa funzione è UTF-16, altrimenti è l'implementazione definita.
Original:
If the macro __STDC_UTF_16__ is defined, the 16-bit encoding used by this function is UTF-16, otherwise it is implementation-defined.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Parametri

pc16 -
puntatore nella posizione in cui il conseguente carattere a 16 bit verrà scritto
Original:
pointer to the location where the resulting 16-bit 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 all'oggetto stato di conversione quando si interpreta la stringa 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.

[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 *pc16 se non nullo) è stato il carattere null
    Original:
    0 if the character converted from s (and stored in *pc16 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.
  • -3 se il char16_t successivo da un multi-char16_t carattere (ad esempio, una coppia di surrogati) è già stato scritto *pc16. Nessun byte vengono elaborati dall'ingresso in questo caso.
    Original:
    -3 if the next char16_t from a multi-char16_t character (e.g. a surrogate pair) has now been written to *pc16. No bytes are processed from the input in this case.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • -2 se i byte n prossimi costituiscono un incompleto, ma finora valido, caratteri multibyte. Nulla è scritto *pc16.
    Original:
    -2 if the next n bytes constitute an incomplete, but so far valid, multibyte character. Nothing is written to *pc16.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • -1 se si verifica errore di codifica. Nulla è scritto *pc16, il EILSEQ valore viene memorizzato nella errno e il valore se non è specificato *ps.
    Original:
    -1 if encoding error occurs. Nothing is written to *pc16, the value EILSEQ is stored in errno and the value if *ps is unspecified.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[modifica] Vedi anche

(C++11)
convertire un carattere a 16 bit larga a stretta stringa multibyte
Original:
convert a 16-bit wide character to narrow multibyte string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(funzione) [edit]
[virtuale]
converte una stringa da externT a internt, come ad esempio durante la lettura dal file
Original:
converts a string from externT to internT, such as when reading from file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(virtuale protetto funzione of std::codecvt membro) [edit]
C documentation for mbrtoc16