Espaces de noms
Variantes
Affichages
Actions

mbsrtowcs

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

 
 
 
Chaînes à zéro terminal multi-octets
Large / multi-octets conversions
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
Types
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 mbsrtowcs( wchar_t* dst, const char** src, size_t len, mbstate_t* ps )
Convertit une séquence se terminant par null caractères multi-octets, qui commence dans l'état de conversion décrite par *ps, à partir du tableau dont le premier élément est pointé par *src à sa représentation de caractères larges. Si dst n'est pas nulle, les caractères convertis sont stockés dans les éléments successifs de la matrice de wchar_t pointé par dst. Pas plus de caractères len larges sont écrits dans le tableau de destination .
Original:
Converts a null-terminated multibyte character sequence, which begins in the conversion state described by *ps, from the array whose first element is pointed to by *src to its wide character representation. If dst is not null, converted characters are stored in the successive elements of the wchar_t array pointed to by dst. No more than len wide characters 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.
Chaque caractère multi-octets est converti comme par un appel à mbrtowc. La conversion s'arrête si:
Original:
Each multibyte character is converted as if by a call to mbrtowc. 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.
  • Le caractère multi-octets nuls été converties et stockées. src est réglé sur NULL et *ps représente l'état initial .
    Original:
    The multibyte 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 caractère multi-octets invalide (en fonction du courant locale C) a été rencontrée. src est configuré pour pointer au début de l'caractères multi-octets non convertis premier .
    Original:
    An invalid multibyte character (according to the current C locale) was encountered. src is set to point at the beginning of the first unconverted multibyte character.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • le caractère suivant à stocker serait len dépasser. src est configuré pour pointer au début de l'caractères multi-octets non convertis d'abord. Cette condition n'est pas vérifiée si dst==NULL .
    Original:
    the next wide character to be stored would exceed len. src is set to point at the beginning of the first unconverted multibyte 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.

Sommaire

[modifier] Paramètres

dst -
pointeur sur un tableau de caractères larges où les résultats seront stockés
Original:
pointer to wide character array where the results 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 -
pointeur vers un pointeur vers le premier élément d'une chaîne multi-octets à zéro terminal
Original:
pointer to pointer to the first element of a null-terminated multibyte string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
len -
nombre de caractères larges disponibles dans le tableau pointé par dst
Original:
number of wide characters 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 -
pointeur vers l'objet de l'état de conversion
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.

[modifier] Retourne la valeur

En cas de succès, retourne le nombre de caractères larges, à l'exclusion du L'\0' fin, écrit au tableau de caractères .. Si dst==NULL, retourne le nombre de caractères larges qui auraient été écrites donné une longueur illimitée .
Original:
On success, returns the number of wide characters, excluding the terminating L'\0', written to the character array.. If dst==NULL, returns the number of wide characters that would have been written given unlimited length.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
En cas d'erreur de conversion (si non valide a été rencontré caractères multi-octets), les rendements (size_t)-1, les magasins EILSEQ dans errno, et laisse dans un état indéterminé *ps .
Original:
On conversion error (if invalid multibyte 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.

[modifier] Exemple

[modifier] Voir aussi

convertit le caractère multi-octets suivante caractère large, état donné
Original:
converts the next multibyte character to wide character, given state
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction) [edit]
convertit une chaîne large de chaîne de caractères multi-octets étroite, état donné
Original:
converts a wide string to narrow multibyte character 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.

(fonction) [edit]
C++ documentation for mbsrtowcs