Namespace
Varianti

wcsrtombs

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
 
Elemento definito nell'header <wchar.h>
size_t wcsrtombs( char* dst, const wchar_t** src, size_t len, mbstate_t* ps )
Converte una sequenza di caratteri estesi dalla matrice il cui primo elemento è puntato da *src alla sua rappresentazione multibyte stretta che inizia nello stato di conversione descritto da *ps. Se dst non è nullo, i caratteri convertiti vengono memorizzati negli elementi successivi della matrice char puntato da dst. Non più di byte len vengono scritti nella matrice di destinazione.
Original:
Converts a sequence of wide characters from the array whose first element is pointed to by *src to its narrow multibyte representation that begins in the conversion state described by *ps. If dst is not null, converted characters are stored in the successive elements of the char array pointed to by dst. No more than len bytes are written to the destination array.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Ogni carattere viene convertito come per una chiamata a wcrtomb. La conversione si interrompe se:
Original:
Each character is converted as if by a call to wcrtomb. The conversion stops if:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • Il carattere null è stato convertito e memorizzato. src è impostato su NULL *ps e rappresenta lo stato iniziale del cambio.
    Original:
    The null character was converted and stored. src is set to NULL and *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.
  • Un wchar_t è accertato che non corrisponde a un carattere valido nella versione locale corrente C. src è impostato per puntare al primo carattere non convertito ampio.
    Original:
    A wchar_t was found that does not correspond to a valid character in the current C locale. src is set to point at the first unconverted wide character.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • il carattere multibyte successivo da memorizzare sarebbe len superare. src è impostato per puntare al primo carattere non convertito di larghezza. Questa condizione non è verificata se dst==NULL.
    Original:
    the next multibyte character to be stored would exceed len. src is set to point at the first unconverted wide character. This condition is not checked if dst==NULL.
    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

dst -
puntatore a matrice di caratteri stretta dove i caratteri multibyte verrà memorizzato
Original:
pointer to narrow character array where the multibyte characters 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.
src -
puntatore al puntatore al primo elemento di una stringa con terminazione null di larghezza
Original:
pointer to pointer to the first element of a null-terminated wide string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
len -
numero di byte disponibili nell'array puntato da dst
Original:
number of bytes available in the array pointed to by dst
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
Original:
pointer to the conversion state object
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

In caso di successo, restituisce il numero di byte (comprese le sequenze di cambio, ma escluso il '\0' finale) scritte per l'array di caratteri il cui primo elemento è puntato da dst. Se dst==NULL, restituisce il numero di byte che sarebbero stati scritti.
Original:
On success, returns the number of bytes (including any shift sequences, but excluding the terminating '\0') written to the character array whose first element is pointed to by dst. If dst==NULL, returns the number of bytes that would have been written.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
In caso di errore di conversione (se non valido caratteri larghi veniva rilevato), ritorna (size_t)-1, negozi EILSEQ in errno e lascia *ps in stato specificato.
Original:
On conversion error (if invalid wide character was encountered), 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.

[modifica] Esempio

[modifica] Vedi anche

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]
converte una stringa di caratteri multibyte stretta alla stringa di larghezza, determinato stato
Original:
converts a narrow multibyte character string to wide string, 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]
C++ documentation for wcsrtombs