std::mbrtoc16
Aus 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. |
definiert in Header <cuchar> | ||
std::size_t mbrtoc16(char16_t* pc16, constchar* s, | (seit C++11) | |
Konvertiert einen schmalen Multibyte-Zeichen in 16-Bit-Zeichen-Darstellung (in der Regel, 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.
Wenn
s
nicht ein NULL-Zeiger, prüft in den meisten n
Bytes des Multibyte-String, beginnend mit dem Byte, auf das s
, um die Anzahl von Bytes um den nächsten Multibyte-Zeichen (einschließlich etwaiger Schichtfolgen) vervollständigen bestimmen. Wenn die Funktion bestimmt, dass die nächste Multibyte-Zeichen in s
vollständig und gültig ist, wandelt sie in die entsprechende 16-Bit-Zeichen und speichert sie in *pc16 (wenn pc16
nicht null ist) .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.
Wenn die Multibyte-Zeichen in
*s
entspricht einer multi-char16_t Sequenz (zB ein Surrogat-Paar in UTF-16), dann nach dem ersten Aufruf dieser Funktion wird *ps
in einer solchen Weise, dass der nächste Aufruf mbrtoc16
wird schreiben, die aktualisierte zusätzliche char16_t, ohne Berücksichtigung *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.
Wenn
s
ein NULL-Zeiger ist, die Werte der n
und pc16
werden ignoriert und der Anruf ist äquivalent zu 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.
Wenn die weite Zeichen produziert, ist das Null-Zeichen stellt die Umwandlung Zustand *ps die erste Schaltzustand .
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.
Wenn das Makro __STDC_UTF_16__ definiert ist, ist die 16-Bit-Codierung von dieser Funktion verwendet UTF-16, ansonsten ist die Implementierung definiert .
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.
[Bearbeiten]Parameter
pc16 | - | Zeiger auf die Stelle, wo das resultierende 16-Bit-Zeichen geschrieben werden 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 | - | Zeiger auf die Multibyte Zeichenkette als Eingabe verwendet 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 | - | Grenze für die Anzahl von Bytes in s, die untersucht werden können 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 | - | Zeiger auf die Umwandlung state-Objekt verwendet werden, wenn der Interpretation der Multibyte-String 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. |
[Bearbeiten]Rückgabewert
Die erste, die der folgenden gilt:
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 wenn der Charakter von
s
umgewandelt (und in *pc16 wenn nicht null) war die Null-ZeichenOriginal: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. - die Anzahl der Bytes [1...n] des Multibyte erfolgreich aus
s
umgewandeltOriginal: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 wenn die nächste char16_t aus einem Multi-char16_t Zeichen (zB ein Surrogat-Paar) wurde nun auf *pc16 geschrieben worden. Keine Bytes aus dem Eingangssignal in diesem Fall verarbeitet .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 wenn die nächsten
n
bytes bilden eine unvollständige, aber bisher gültige Multibyte-Zeichens. Nichts wird dem *pc16 geschrieben .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 wenn die Kodierung Fehler auftritt. Nichts zu
*pc16
geschrieben wird, wird der Wert EILSEQ in errno gespeichert und der Wert, wenn *ps ist unbegrenzt .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.
[Bearbeiten]Siehe auch
(C++11) | konvertiert einen 16-Bit breiten Zeichen Multibyte-String einzugrenzen 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. (Funktion) |
[virtuell] | wandelt eine Zeichenkette aus externT um Internt wie beim Lesen aus Datei 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. (virtuellen geschützten Member-Funktion of std::codecvt ) |
C documentation for mbrtoc16 |