Namespace
Varianti

std::wctob

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

 
 
Stringhe libreria
Null-stringhe terminate
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 stringhe
Multibyte stringhe
Stringhe larghe
Classi
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
 
Stringhe multibyte null-terminated
Wide / multibyte conversioni
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
Tipi
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 <cwchar>
int wctob( std::wint_t c );
Narrows un c caratteri estesi se il suo equivalente carattere multibyte nello stato iniziale è un passaggio singolo 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.
Questo è in genere possibile per i caratteri del set di caratteri ASCII, dal momento che la maggior parte delle codifiche multibyte (come UTF-8) utilizzano singoli byte per codificare i caratteri.
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.

Indice

[modifica] Parametri

c -
carattere larga a stretta
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.

[modifica] Valore di ritorno

EOF c se non rappresenta un carattere multibyte con 1 lunghezza in stato di spostamento iniziale.
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.
caso contrario, il singolo byte della rappresentazione c come unsigned char convertito int
Original:
Otherwise, the single-byte representation of c as unsigned char 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.

[modifica] Esempio

#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

[modifica] Vedi anche

allarga un carattere a singolo byte stretto a carattere esteso, se possibile
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.

(funzione) [edit]
[virtuale]
converte uno o più caratteri da charT a 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.

(virtuale protetto funzione of std::ctype membro) [edit]
C documentation for wctob