Namensräume
Varianten

std::wctob

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

 
 
Strings Bibliothek
Null-terminierte Strings
Original:
Null-terminated strings
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Byte-Strings
Multibyte-Strings
Wide Strings
Classes
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string
char_traits
 
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
 
definiert in Header <cwchar>
int wctob(std::wint_t c );
Narrows eine breite Charakter c wenn seine Multibyte-Zeichen entspricht in der ersten Schaltzustand ist ein Single-Byte .
Original:
Narrows a wide character c if its multibyte character equivalent in the initial shift state is a single byte.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Dieser ist in der Regel für die Zeichen aus dem ASCII-Zeichensatz möglich, da die meisten Multibyte-Kodierungen (wie UTF-8) verwenden einzelnen Bytes, um diese Zeichen zu kodieren .
Original:
This is typically possible for the characters from the ASCII character set, since most multibyte encodings (such as UTF-8) use single bytes to encode those characters.
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

c -
Breitzeichen einzuengen
Original:
wide character to narrow
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

EOF wenn c stellen keine Multibyte-Zeichen mit einer Länge 1 in ersten Schaltzustand .
Original:
EOF if c does not represent a multibyte character with length 1 in 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.
Andernfalls wird die Single-Byte-Darstellung c als unsignedchar um int
Original:
Otherwise, the single-byte representation of c as unsignedchar converted to int
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten]Beispiel

#include <cwchar>#include <cstdio>#include <clocale>   int main(){std::setlocale(LC_ALL, "");std::printf("narrow: %c\nnarrowed from wide: %c\n", 'a', std::wctob(L'a'));}

Output:

narrow: a narrowed from wide: a

[Bearbeiten]Siehe auch

weitet sich ein Single-Byte engen Charakter-Zeichen, wenn möglich
Original:
widens a single-byte narrow character to wide character, if possible
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
[virtuell]
wandelt ein Zeichen oder Zeichen aus charT um char
Original:
converts a character or characters from charT to char
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::ctype)[edit]
C documentation for wctob
close