std::mbrtoc32
De cppreference.com
|
|
Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.
La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
| Definido en el archivo de encabezado <cuchar>
|
||
std::size_t mbrtoc32( char32_t* pc32, const char* s, std::size_t n, std::mbstate_t* ps ); |
(desde C++11) | |
Convierte un carácter multibyte estrecho para su representación de caracteres de 32 bits (por lo general, 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.
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 32-bit de caracteres y la almacena en *pc32 (si pc32 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 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.
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-char32_t (no compatible con UTF-32), a continuación, después de la primera llamada a esta función, *ps se actualiza de manera tal que las próximas convocatorias a mbrtoc32 escribirá el char32_t adicional , sin 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.
You can help to correct and verify the translation. Click here for instructions.
Si
s es un puntero nulo, los valores de n y pc32 son ignorados y la llamada es equivalente a std::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 std::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.
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.
You can help to correct and verify the translation. Click here for instructions.
Si el
__STDC_UTF_32__ macro está definido, la codificación de 32 bits utilizada por esta función es UTF-32, de lo contrario es definido por la implantación .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.
You can help to correct and verify the translation. Click here for instructions.
Parámetros
| pc32 | - | puntero a la ubicación donde se realizará la resultante de 32-bit carácter 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 | - | 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. |
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.
You can help to correct and verify the translation. Click here for instructions.
0Si el carácter des(y se almacena en*pc32si no nulo) fue el carácter nuloOriginal:0if the character converted froms(and stored in*pc32if 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.- el número de bytes de
[1...n]el carácter multibyte convertidos con éxito desdesOriginal: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. -3si elchar32_tsiguiente de un carácter multi-char32_tha sido escrito para*pc32. No se procesan los bytes desde la entrada en este caso .Original:-3if the nextchar32_tfrom a multi-char32_tcharacter 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.-2si los bytesnpróximos constituir un incompleto, pero hasta ahora vigente, el carácter multibyte. Nada está escrito a*pc32.Original:-2if the nextnbytes 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.-1si se produce error de codificación. No se escribe nada*pc32, la EILSEQ valor se almacena en errno y el valor*pssi no está especificado .Original:-1if encoding error occurs. Nothing is written to*pc32, 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.
Ver también
(C++11) |
convertir un carácter ancho de 32-bit para reducir cadena 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. (función) |
[virtual] |
convierte una cadena de externT a internt, como cuando al leer el archivo Original: converts a string from externT to internT, such as when reading from file The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro virtual protegida de std::codecvt)
|
Documentación de C para mbrtoc32
| |