Espaços nominais
Variantes
Acções

std::btowc

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

 
 
Biblioteca cordas
Strings terminadas
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.
Cadeias de bytes
Multibyte cordas
Cordas de largura
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
 
Strings terminadas multibyte
Wide / multibyte conversões
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
Tipos
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>
std::wint_t btowc( int c );
Amplia a c caractere de byte único para o seu equivalente caractere de largura.
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.
Codificação de caracteres multibyte mais usar códigos de byte único para representar os caracteres do conjunto de caracteres ASCII. Esta função pode ser usada para converter esses caracteres para wchar_t.
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.

Índice

[editar] Parâmetros

c -
caractere de byte único a aumentar
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.

[editar] Valor de retorno

WEOF if c is EOF.

Representação de caracteres gama de c se (unsigned char)c é um caractere de byte único válido no estado deslocamento inicial, WEOF outra forma.
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.

[editar] Exemplo

#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

[editar] Veja também

restringe um caráter amplo para um caractere de byte único estreita, se possível
Original:
narrows a wide character to a single-byte narrow 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.

(função) [edit]
[virtual]
converte um caractere ou caracteres de char para charT
Original:
converts a character or characters from char to charT
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(virtual protegido of std::ctype função de membro) [edit]
C documentation for btowc