Espacios de nombres
Variantes
Acciones

mbsrtowcs

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 <wchar.h>
size_t mbsrtowcs( wchar_t* dst, const char** src, size_t len, mbstate_t* ps )
Convierte una secuencia de terminación nula carácter multibyte que comienza en el estado de conversión descrito por *ps, de la matriz cuyo primer elemento es apuntado por *src en la representación de caracteres anchos. Si dst no es nulo, los caracteres convertidos se almacenan en los sucesivos elementos de la matriz wchar_t apuntado por dst. No más de caracteres anchos len se escriben en la matriz de destino .
Original:
Converts a null-terminated multibyte character sequence, which begins in the conversion state described by *ps, from the array whose first element is pointed to by *src to its wide character representation. If dst is not null, converted characters are stored in the successive elements of the wchar_t array pointed to by dst. No more than len wide characters are written to the destination array.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Cada carácter multibyte se convierte como si de una llamada a mbrtowc. La conversión se para si:
Original:
Each multibyte character is converted as if by a call to mbrtowc. The conversion stops if:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • El carácter nulo multibyte se convierte y se almacena. src se establece NULL y *ps representa el estado inicial de cambios .
    Original:
    The multibyte null character was converted and stored. src is set to NULL and *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.
  • Un carácter multibyte inválida (de acuerdo con la actual configuración regional C) fue encontrado. src se establece en el punto al principio del carácter multibyte sin convertir primero .
    Original:
    An invalid multibyte character (according to the current C locale) was encountered. src is set to point at the beginning of the first unconverted multibyte character.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • el siguiente carácter amplio para ser almacenado sería len exceder. src se establece en el punto al principio del carácter multibyte sin convertir primero. Esta condición no se comprueba si dst==NULL .
    Original:
    the next wide character to be stored would exceed len. src is set to point at the beginning of the first unconverted multibyte character. This condition is not checked if dst==NULL.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

Contenido

[editar] Parámetros

dst -
puntero al array de caracteres anchos que los resultados serán almacenados
Original:
pointer to wide character array where the results 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.
src -
puntero a puntero al primer elemento de una cadena multibyte terminado en nulo
Original:
pointer to pointer to the first element of a null-terminated multibyte string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
len -
número de caracteres anchos disponibles en el array apuntado por dst
Original:
number of wide characters available in the array pointed to by dst
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 la conversión
Original:
pointer to the conversion state object
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 caracteres anchos, sin incluir el L'\0' termina, se escribe en la matriz de caracteres .. Si dst==NULL, devuelve el número de caracteres anchos que se han escrito dado longitud ilimitada .
Original:
On success, returns the number of wide characters, excluding the terminating L'\0', written to the character array.. If dst==NULL, returns the number of wide characters that would have been written given unlimited length.
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 error de conversión (si inválido carácter multibyte fue encontrado), vuelve (size_t)-1, tiendas EILSEQ en errno y deja *ps en estado indeterminado .
Original:
On conversion error (if invalid multibyte character was encountered), returns (size_t)-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] Ejemplo

[editar] Ver también

convierte el carácter multibyte junto al carácter amplio, estado dado
Original:
converts the next multibyte character to wide character, given state
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]
convierte una cadena a cadena estrecha gama de caracteres multibyte, estado dado
Original:
converts a wide string to narrow multibyte character string, given state
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 mbsrtowcs