std::mbrtoc16
De cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
<metanoindex/>
<tbody> </tbody>| Definido no cabeçalho <cuchar>
|
||
std::size_t mbrtoc16( char16_t* pc16, const char* s, std::size_t n, std::mbstate_t* ps ); |
(desde C++11) | |
Converte um caractere multibyte estreita para 16 bits representação de caracteres (normalmente, UTF-16).
Original:
Converts a narrow multibyte character to 16-bit character representation (typically, UTF-16).
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.
Se
s não é um ponteiro nulo, inspeciona a maioria dos bytes n da cadeia de caracteres multibyte, começando com o byte apontado pelo s para determinar o número de bytes necessários para completar o personagem multibyte seguinte (incluindo as seqüências de turnos). Se a função determina que o caráter de multibyte próximo s é completa e válida, converte-lo para o personagem de 16 bits correspondente e armazena em *pc16 (se pc16 não é nulo).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 16-bit character and stores it in *pc16 (if pc16 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.
You can help to correct and verify the translation. Click here for instructions.
Se o personagem multibyte em
*s corresponde a uma seqüência de vários char16_t (por exemplo, um par substituto em UTF-16), logo após a primeira chamada para esta função, *ps é atualizado de tal forma que a próxima chamada para mbrtoc16 vai escrever o char16_t adicionais, sem considerar *s.Original:
If the multibyte character in
*s corresponds to a multi-char16_t sequence (e.g. a surrogate pair in UTF-16), then after the first call to this function, *ps is updated in such a way that the next call to mbrtoc16 will write out the additional char16_t, without considering *s.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.
Se
s é um ponteiro nulo, os valores de n e pc16 são ignorados ea chamada é equivalente a std::mbrtoc16(NULL, "", 1, ps).Original:
If
s is a null pointer, the values of n and pc16 are ignored and the call is equivalent to std::mbrtoc16(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.
You can help to correct and verify the translation. Click here for instructions.
Se o personagem de largura produzida é o caractere nulo, o
*ps estado de conversão representa o estado deslocamento inicial.Original:
If the wide character produced is the null character, the conversion state
*ps represents 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.
You can help to correct and verify the translation. Click here for instructions.
Se o
__STDC_UTF_16__ macro é definida, a codificação de 16 bits usado por esta função é UTF-16, caso contrário, é definida pela implementação.Original:
If the macro
__STDC_UTF_16__ is defined, the 16-bit encoding used by this function is UTF-16, otherwise it is implementation-defined.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.
Parâmetros
| pc16 | - | ponteiro para o local onde o resultante caracteres de 16 bits será escrito
Original: pointer to the location where the resulting 16-bit 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 | - | ponteiro para a cadeia de caracteres multibyte usado como entrada
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 | - | limitar o número de bytes em s que podem ser examinados
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 | - | ponteiro para o objeto de estado de conversão utilizado ao interpretar a string multibyte
Original: pointer to the conversion state object 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. |
Valor de retorno
O primeiro dos seguintes que se aplica:
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.
You can help to correct and verify the translation. Click here for instructions.
0se o personagem convertido des(e armazenados na*pc16se não nulo) foi o caractere nuloOriginal:0if the character converted froms(and stored in*pc16if non-null) was the null characterThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.- o número de bytes
[1...n]do caractere multibyte convertidos com êxito a partir desOriginal:the number of bytes[1...n]of the multibyte character successfully converted fromsThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. -3se ochar16_tpróxima de um caráter multi-char16_t(por exemplo, um par substituto) já foi escrito para*pc16. Sem bytes são processados a partir da entrada, neste caso,.Original:-3if the nextchar16_tfrom a multi-char16_tcharacter (e.g. a surrogate pair) has now been written to*pc16. No bytes are processed from the input in this case.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.-2se os bytesnpróximos constituem um incompleta, mas até agora válida personagem, multibyte. Nada é escrito para*pc16.Original:-2if the nextnbytes constitute an incomplete, but so far valid, multibyte character. Nothing is written to*pc16.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.-1se ocorre erro de codificação. Nada é escrito para*pc16, o EILSEQ valor é armazenado em errno eo valor se*psé indeterminado.Original:-1if encoding error occurs. Nothing is written to*pc16, the value EILSEQ is stored in errno and the value if*psis unspecified.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Veja também
(C++11) |
converte um caractere de 16 bits de largura para estreitar string multibyte Original: convert a 16-bit wide character to narrow multibyte string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função) |