std::mbrtoc16 – cppreference.com
Aus cppreference.com
<metanoindex/>
<tbody> </tbody>
| definiert in Header <cuchar> |
||
|
|
(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.
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.
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.
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.
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.
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.
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. |
| 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. |
| 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. |
| 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. |
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.
0wenn der Charakter vonsumgewandelt (und in*pc16wenn nicht null) war die Null-ZeichenOriginal:
0if the character converted froms(and stored in*pc16if 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 aussumgewandeltOriginal:
the number of bytes
[1...n]of the multibyte character successfully converted fromsThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.-3wenn die nächstechar16_taus einem Multi-char16_tZeichen (zB ein Surrogat-Paar) wurde nun auf*pc16geschrieben worden. Keine Bytes aus dem Eingangssignal in diesem Fall verarbeitet .Original:
-3if the nextchar16_tfrom a multi-char16_tcharacter (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.-2wenn die nächstennbytes bilden eine unvollständige, aber bisher gültige Multibyte-Zeichens. Nichts wird dem*pc16geschrieben .Original:
-2if the nextnbytes 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.-1wenn die Kodierung Fehler auftritt. Nichts zu*pc16geschrieben wird, wird der Wert EILSEQ in errno gespeichert und der Wert, wenn*psist unbegrenzt .Original:
-1if encoding error occurs. Nothing is written to*pc16, the value EILSEQ is stored in errno and the value if*psis unspecified.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
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. (Funktion) [edit] |
[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. (virtuellen geschützten Member-Funktion of std::codecvt) [edit]
|
C documentation for mbrtoc16 | |