Namensräume
Varianten
Aktionen

mbrtowc

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

 
 
 
Nullterminierten Multibyte Strings
Wide / Multibyte Konvertierungen
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 mbrtowc( wchar_t* pwc, const char* s, size_t n, mbstate_t* ps );
Konvertiert einen schmalen Multibyte-Zeichen zu einem breiten Charakter .
Original:
Converts a narrow multibyte character to a wide character.
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 es in der entsprechenden Breitzeichen und speichert sie in *pwc (wenn pwc 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 wide character and stores it in *pwc (if pwc 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 ein Null-Zeiger s ist, die Werte von n und pwc ignoriert und Anruf entspricht mbrtowc(NULL, "", 1, ps) .
Original:
If s is a null pointer, the values of n and pwc are ignored and call is equivalent to mbrtowc(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, ist die Umwandlung Staat *ps gespeicherten die ursprüngliche Schaltzustand .
Original:
If the wide character produced is the null character, the conversion state stored in *ps is 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.

Inhaltsverzeichnis

[Bearbeiten] Parameter

pwc -
Zeiger auf die Stelle, wo das resultierende breite Zeichen geschrieben werden
Original:
pointer to the location where the resulting wide 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 Zustand verwendet bei der Auslegung des Multibyte-String
Original:
pointer to the conversion state 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.
  • 0 wenn der Charakter von s umgewandelt (und in pwc wenn nicht null) war die Null-Zeichen
    Original:
    0 if the character converted from s (and stored in pwc if non-null) was the null character
    The 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 umgewandelt
    Original:
    the number of bytes [1...n] of the multibyte character successfully converted from s
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (size_t)-2 wenn die nächsten n bytes bilden eine unvollständige, aber bisher gültige Multibyte-Zeichens. Nichts wird dem *pwc geschrieben .
    Original:
    (size_t)-2 if the next n bytes constitute an incomplete, but so far valid, multibyte character. Nothing is written to *pwc.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (size_t)-1 wenn die Kodierung Fehler auftritt. Nichts zu *pwc geschrieben wird, wird der Wert EILSEQ in errno gespeichert und der Wert *ps undefiniert bleibt .
    Original:
    (size_t)-1 if encoding error occurs. Nothing is written to *pwc, the value EILSEQ is stored in errno and the value of *ps is left unspecified.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Beispiel

[Bearbeiten] Siehe auch

wandelt die nächsten Multibyte Zeichen-Zeichen
Original:
converts the next multibyte character to wide character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion) [edit]
wandelt eine breite Charakter seiner Multibyte-Darstellung, gegebenen Zustand
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.

(Funktion) [edit]
C++ documentation for mbrtowc