Espacios de nombres
Variantes
Acciones

wcsrtombs

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 wcsrtombs( char* dst, const wchar_t** src, size_t len, mbstate_t* ps )
Convierte una secuencia de caracteres anchos del array cuyo primer elemento es apuntado por *src a su representación multibyte estrecho que comienza en el estado de conversión descrito por *ps. Si dst no es nulo, los caracteres convertidos se almacenan en los elementos sucesivos de la matriz de caracteres apuntada por dst. No más de len bytes se escriben en la matriz de destino .
Original:
Converts a sequence of wide characters from the array whose first element is pointed to by *src to its narrow multibyte representation that begins in the conversion state described by *ps. If dst is not null, converted characters are stored in the successive elements of the char array pointed to by dst. No more than len bytes 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 personaje se convierte como si de una llamada a wcrtomb. La conversión se para si:
Original:
Each character is converted as if by a call to wcrtomb. 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 se convierte y se almacena. src se establece NULL y *ps representa el estado inicial de cambios .
    Original:
    The 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 wchar_t se encontró que no corresponde a un carácter válido en la actual configuración regional C. src se establece en el punto en el primer carácter ancho no convertido .
    Original:
    A wchar_t was found that does not correspond to a valid character in the current C locale. src is set to point at the first unconverted wide character.
    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 multibyte próximo a almacenar len se superan. src se establece en el punto en el primer carácter ancho no convertido. Esta condición no se comprueba si dst==NULL .
    Original:
    the next multibyte character to be stored would exceed len. src is set to point at the first unconverted wide 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 estrecha, donde los caracteres de varios bytes se almacenará
Original:
pointer to narrow character array where the multibyte characters 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 terminada en nulo de ancho
Original:
pointer to pointer to the first element of a null-terminated wide 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 bytes disponibles en el array apuntado por dst
Original:
number of bytes 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 bytes (incluyendo cualquier secuencia de turnos, pero excluyendo el '\0' terminación) por escrito a la matriz de caracteres cuyo primer elemento es apuntado por dst. Si dst==NULL, devuelve el número de bytes que se han escrito .
Original:
On success, returns the number of bytes (including any shift sequences, but excluding the terminating '\0') written to the character array whose first element is pointed to by dst. If dst==NULL, returns the number of bytes that would have been written.
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 ancho fue encontrado), vuelve (size_t)-1, tiendas EILSEQ en errno y deja *ps en estado indeterminado .
Original:
On conversion error (if invalid wide 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 una carácter ancho a su representación multibyte, estado dado
Original:
converts a wide character to its multibyte representation, 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 de caracteres multibyte estrecho a la cadena de ancho, estado dado
Original:
converts a narrow multibyte character string to wide 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 wcsrtombs