Espaços nominais
Variantes
Ações

mbrtoc32

De cppreference.com

<metanoindex/>

 
 
 
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.
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.
 
<tbody> </tbody>
Definido no cabeçalho <cuchar>
size_t mbrtoc32( char32_t* pc32, const char* s, size_t n, mbstate_t* ps );
(desde C11)
Converte um caractere multibyte estreita para a sua representação de caracteres de 32 bits (normalmente, UTF-32).
Original:
Converts a narrow multibyte character to its 32-bit character representation (typically, UTF-32).
The text has been machine-translated via Google Translate.
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 32 bits correspondente e armazena em *pc32 (se pc32 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 32-bit character and stores it in *pc32 (if pc32 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.
Se o personagem multibyte em *s corresponde a uma seqüência de vários char32_t (não é possível com UTF-32), logo após a primeira chamada para esta função, *ps é atualizado de tal maneira que as chamadas ao lado de mbrtoc32 vai escrever o char32_t adicional , sem considerar *s.
Original:
If the multibyte character in *s corresponds to a multi-char32_t sequence (not possible with UTF-32), then after the first call to this function, *ps is updated in such a way that the next calls to mbrtoc32 will write out the additional char32_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.
Se s é um ponteiro nulo, os valores de n e pc32 são ignorados ea chamada é equivalente a mbrtoc32(NULL, "", 1, ps).
Original:
If s is a null pointer, the values of n and pc32 are ignored and the call is equivalent to mbrtoc32(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.
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.
Se o __STDC_UTF_32__ macro é definida, a codificação de 32 bits utilizado por esta função é UTF-32, caso contrário, é definida pela implementação.
Original:
If the macro __STDC_UTF_32__ is defined, the 32-bit encoding used by this function is UTF-32, 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.

Parâmetros

pc32 -
ponteiro para o local em que o personagem 32-bit resultante será escrito
Original:
pointer to the location where the resulting 32-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.
  • 0 se o personagem convertido de s (e armazenados na *pc32 se não nulo) foi o caractere nulo
    Original:
    0 if the character converted from s (and stored in *pc32 if non-null) was the null character
    The 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 de s
    Original:
    the number of bytes [1...n] of the multibyte character successfully converted from s
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • -3 se o char32_t próxima de um caráter multi-char32_t já foi escrito para *pc32. Sem bytes são processados ​​a partir da entrada, neste caso,.
    Original:
    -3 if the next char32_t from a multi-char32_t character has now been written to *pc32. 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.
  • -2 se os bytes n próximos constituem um incompleta, mas até agora válida personagem, multibyte. Nada é escrito para *pc32.
    Original:
    -2 if the next n bytes constitute an incomplete, but so far valid, multibyte character. Nothing is written to *pc32.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • -1 se ocorre erro de codificação. Nada é escrito para *pc32, o EILSEQ valor é armazenado em errno eo valor se *ps é indeterminado.
    Original:
    -1 if encoding error occurs. Nothing is written to *pc32, the value EILSEQ is stored in errno and the value if *ps is 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

converte um caractere de 32 bits de largura para estreitar string multibyte
Original:
convert a 32-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) [edit]
C++ documentation for mbrtoc32