Espacios de nombres
Variantes
Acciones

mbrtoc16

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 mbrtoc16( char16_t* pc16, const char* s, size_t n, mbstate_t* ps );
(desde C11)
Convierte un carácter multibyte estrecho a la representación de caracteres de 16 bits (por lo general, 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.
Si s no es un puntero nulo, inspecciona en la mayoría de los bytes n de la cadena de caracteres de varios bytes, comenzando con el byte apuntado por s para determinar el número de bytes necesarios para completar el siguiente carácter multibyte (incluyendo cualquiera de las secuencias de desplazamiento). Si la función determina que el siguiente carácter multibyte en s es completa y válida, convierte a la correspondiente 16-bit de caracteres y la almacena en *pc16 (si pc16 no es 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.
Si el carácter multibyte en *s corresponde a una secuencia multi-char16_t (por ejemplo, un par suplente en UTF-16), a continuación, después de la primera llamada a esta función, *ps se actualiza de forma que la siguiente llamada a mbrtoc16 escribirá el char16_t adicional, sin tener en cuenta *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.
Si s es un puntero nulo, los valores de n y pc16 son ignorados y la llamada es equivalente a 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 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.
Si el carácter amplio producido es el carácter nulo, el *ps estado de conversión representa el estado inicial de cambios .
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.
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 .
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.

[editar] Parámetros

pc16 -
puntero a la ubicación donde se realizará el resultado de 16-bit carácter 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 -
puntero a la cadena de caracteres multibyte utiliza 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 el número de bytes en s que puede ser examinado
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 -
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

El primero de los siguientes que corresponda:
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 Si el carácter de s (y se almacena en *pc16 si no nulo) fue el carácter nulo
    Original:
    0 if the character converted from s (and stored in *pc16 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.
  • el número de bytes de [1...n] el carácter multibyte convertidos con éxito desde 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 si el char16_t siguiente de un carácter multi-char16_t (por ejemplo, un par suplente) ha sido escrito para *pc16. No se procesan los bytes desde la entrada en este caso .
    Original:
    -3 if the next char16_t from a multi-char16_t character (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.
  • -2 si los bytes n próximos constituir un incompleto, pero hasta ahora vigente, el carácter multibyte. Nada está escrito a *pc16 .
    Original:
    -2 if the next n bytes 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.
  • -1 si se produce error de codificación. No se escribe nada *pc16, la EILSEQ valor se almacena en errno y el valor *ps si no está especificado .
    Original:
    -1 if encoding error occurs. Nothing is written to *pc16, 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.

[editar] Ver también

convertir un carácter ancho de 16-bit para reducir cadena 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.

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