std::btowc
Aus cppreference.com
<metanoindex/>
<tbody> </tbody>| definiert in Header <cwchar>
|
||
std::wint_t btowc( int c ); |
||
Weitet sich eine Single-Byte-Zeichen
c seiner breiten Charakter entspricht .Original:
Widens a single-byte character
c to its wide character equivalent.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.
Die meisten Multibyte-Zeichenkodierung verwenden Single-Byte-Codes, um die Zeichen aus dem ASCII-Zeichensatz darstellen. Diese Funktion kann verwendet werden, um solche Schriftzeichen
wchar_t umzuwandeln .Original:
Most multibyte character encodings use single-byte codes to represent the characters from the ASCII character set. This function may be used to convert such characters to
wchar_t.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.
Parameter
| c | - | Single-Byte-Zeichen zu erweitern
Original: single-byte character to widen The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Rückgabewert
WEOF if c is EOF.
Wide character Darstellung
c wenn (unsigned char)c ist eine gültige Single-Byte-Zeichen in der ursprünglichen Schaltzustand WEOF sonst .Original:
Wide character representation of
c if (unsigned char)c is a valid single-byte character in the initial shift state, WEOF otherwise.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.
Beispiel
#include <cwchar>
#include <cstdio>
#include <clocale>
int main()
{
std::setlocale(LC_ALL, "");
std::wprintf(L"wide: %lc\nwidened from narrow: %lc\n", L'a', std::btowc('a'));
}
Output:
wide: a
widened from narrow: a
