std::mbrtoc16
De cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Déclaré dans l'en-tête <cuchar>
|
||
std::size_t mbrtoc16( char16_t* pc16, const char* s, |
(depuis C++11) | |
Convertit un caractère multi-octets étroite pour la représentation des caractères sur 16 bits (en général, 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.
You can help to correct and verify the translation. Click here for instructions.
Si
s
n'est pas un pointeur NULL, inspecte les octets plupart n
de la chaîne de caractères multi-octets, en commençant par l'octet pointé par s
pour déterminer le nombre d'octets nécessaires pour compléter le caractère multi-octets suivante (y compris les séquences de décalage). Si la fonction détermine que le caractère multi-octets prochaine s
est complet et valide, il se convertit au correspondant caractères 16 bits et le stocke dans *pc16 (si pc16
n'est pas nulle) .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.
You can help to correct and verify the translation. Click here for instructions.
Si le caractère multi-octets dans
*s
correspond à une séquence multi-char16_t (par exemple une paire de substitution UTF-16), puis après le premier appel à cette fonction, *ps
est mis à jour de façon à ce que le prochain appel à mbrtoc16
écrira l' char16_t supplémentaires, sans tenir compte *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.
You can help to correct and verify the translation. Click here for instructions.
Si
s
est un pointeur nul, les valeurs de n
et pc16
sont ignorés et l'appel est équivalent à 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.
You can help to correct and verify the translation. Click here for instructions.
Si le caractère large produite est le caractère nul, le *ps état de conversion représente l'état initial .
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.
You can help to correct and verify the translation. Click here for instructions.
Si le __STDC_UTF_16__ macro est définie, l'encodage 16-bits utilisé par cette fonction est UTF-16, sinon il est défini par l'implémentation .
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.
You can help to correct and verify the translation. Click here for instructions.
[modifier] Paramètres
pc16 | - | pointeur à l'endroit où la résultante 16-bit de caractère doit être écrite
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 | - | pointeur vers la chaîne de caractères multi-octets utilisée comme entrée
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 | - | limiter le nombre d'octets dans s qui peut être examiné
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 | - | pointeur vers l'objet de l'état de conversion utilisé pour interpréter la chaîne multi-octets
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. |
[modifier] Retourne la valeur
La première des éventualités suivantes qui s'applique:
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.
You can help to correct and verify the translation. Click here for instructions.
- 0 si le caractère converti à partir
s
(et stockées dans *pc16 si non nul) est le caractère nulOriginal:0 if the character converted froms
(and stored in *pc16 if non-null) was the null characterThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - le nombre d'octets de la [1...n] caractère multi-octets convertis avec succès à partir de
s
Original:the number of bytes [1...n] of the multibyte character successfully converted froms
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - -3 si le char16_t prochaine d'un caractère multi-char16_t (par exemple une paire de substitution) a été écrit à *pc16. Pas octets sont traitées à partir de l'entrée dans cette affaire .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 si les octets
n
prochaines constituer une incomplet, mais jusqu'à présent, valide, caractères multi-octets. Rien n'est écrit sur *pc16 .Original:-2 if the nextn
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 si erreur de codage survient. Rien n'est écrit sur
*pc16
, le EILSEQ valeur est stockée dans errno et si la valeur n'est pas spécifiée *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.
[modifier] Voir aussi
(C++11) |
convertir un caractère large de 16 bits pour affiner chaîne multi-octets 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. (fonction) |
[ virtuel ]Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
convertit une chaîne de Externt à internt, comme lors de la lecture du fichier 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. (fonction membre virtuelle protégée de std::codecvt )
|
C documentation for mbrtoc16
|