Espacios de nombres
Variantes
Acciones

c16rtomb

De cppreference.com
< c‎ | string‎ | multibyte

 
 
 
Terminadas en nulo de varios bytes
Ancho / multibyte conversiones
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 <uchar.h>
size_t c16rtomb( char* s, char16_t c16, mbstate_t* ps );
(desde C11)
Convierte un carácter ancho de 16-bit para reducir carácter multibyte .
Original:
Converts a 16-bit wide character to narrow multibyte character.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Si s no es un puntero nulo, la función determina el número de bytes necesarios para almacenar la representación de caracteres multibyte de c16 (incluidas las secuencias de desplazamiento), y almacena la representación de caracteres multibyte en la matriz de caracteres cuyo primer elemento es apuntado por s. En la mayoría de los bytes MB_CUR_MAX puede ser escrito por esta función .
Original:
If s is not a null pointer, the function determines the number of bytes necessary to store the multibyte character representation of c16 (including any shift sequences), and stores the multibyte character representation in the character array whose first element is pointed to by s. At most MB_CUR_MAX bytes can be written by this function.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Si s es un puntero nulo, la llamada es equivalente a c16rtomb(buf, u'\0', ps) por alguna buf buffer interno .
Original:
If s is a null pointer, the call is equivalent to c16rtomb(buf, u'\0', ps) for some internal buffer buf.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Si c16 es el u'\0' nulo carácter amplio, un byte nulo es almacenado, precedida de una secuencia de cambios necesarios para restaurar el estado inicial de cambios y el estado de conversión *ps parámetro se actualiza para representar el estado inicial de cambios .
Original:
If c16 is the null wide character u'\0', a null byte is stored, preceded by any shift sequence necessary to restore the initial shift state and the conversion state parameter *ps is updated to represent 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.
Si el __STDC_UTF_16__ macro está definido, la codificación de 16 bits utilizada por esta función es UTF-16, de lo contrario es definido por la implantación. En cualquier caso, la codificación multibyte utilizado por esta función se especifica por la configuración regional C actualmente activo .
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. In any case, the multibyte encoding used by this function is specified by the currently active C locale.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Parámetros

s -
puntero al array de caracteres estrecho donde se realizará el carácter multibyte almacenados
Original:
pointer to narrow character array where the multibyte character will be stored
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
c16 -
el carácter de 16-bit para convertir
Original:
the 16-bit character to convert
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ps -
puntero al objeto de estado de conversión que se utiliza al interpretar la cadena 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.

[editar] Valor de retorno

En caso de éxito, devuelve el número de bytes (incluyendo las secuencias de cambio) por escrito a la matriz de caracteres cuyo primer elemento es apuntado por s. Este valor puede ser 0, por ejemplo al procesar la primera char16_t en un par suplente .
Original:
On success, returns the number of bytes (including any shift sequences) written to the character array whose first element is pointed to by s. This value may be 0, e.g. when processing the first char16_t in a surrogate pair.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
En caso de fallo (si c16 no es válido caracteres de 16 bits), regresa -1, tiendas EILSEQ en errno y deja *ps en estado indeterminado .
Original:
On failure (if c16 is not a valid 16-bit character), returns -1, stores EILSEQ in errno, and leaves *ps in unspecified state.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Ver también

generar el próximo 16-bit de ancho carácter de una cadena multibyte estrecho
Original:
generate the next 16-bit wide character from a 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.

(función) [edit]
C++ documentation for c16rtomb