Espacios de nombres
Variantes
Acciones

mblen

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 <stdlib.h>
int mblen( const char* s, size_t n );
Determina el tamaño, en bytes, del carácter multibyte cuyo primer byte es apuntado por s .
Original:
Determines the size, in bytes, of the multibyte character whose first byte is pointed to by 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, se restablece el estado de conversión global y determinar si las secuencias de desplazamiento se utilizan .
Original:
If s is a null pointer, resets the global conversion state and determined whether shift sequences are used.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Esta función es equivalente a la mbtowc((wchar_t*)0, s, n) llamada, salvo que el estado de conversión de mbtowc no se ve afectada .
Original:
This function is equivalent to the call mbtowc((wchar_t*)0, s, n), except that conversion state of mbtowc is unaffected.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Contenido

[editar] Notas

Cada llamada a las actualizaciones de estado interno mblen la conversión global (un objeto estático de mbstate_t tipo, sólo se sabe que esta función). Si la codificación multibyte utiliza estados de cambio, se debe tener cuidado para evitar las exploraciones de rastreo o múltiples. En cualquier caso, varios subprocesos no debe llamar mblen sin sincronización: mbrlen lugar se puede utilizar .
Original:
Each call to mblen updates the internal global conversion state (a static object of type mbstate_t, only known to this function). If the multibyte encoding uses shift states, care must be taken to avoid backtracking or multiple scans. In any case, multiple threads should not call mblen without synchronization: mbrlen may be used instead.
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 carácter multibyte
Original:
pointer to the multibyte character
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.

[editar] Valor de retorno

Si s no es un puntero nulo, devuelve el número de bytes que se contienen en el carácter multibyte o -1 si los primeros bytes que apunta s no forman un carácter multibyte válida o si 0 s está apuntando a la charcter nulo '\0' .
Original:
If s is not a null pointer, returns the number of bytes that are contained in the multibyte character or -1 if the first bytes pointed to by s do not form a valid multibyte character or 0 if s is pointing at the null charcter '\0'.
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, restablece su estado de conversión interna para representar el estado inicial de cambios y devoluciones si 0 la codificación multibyte actual no es dependiente del estado (no utiliza secuencias de turnos) o un valor distinto de cero si la codificación multibyte actual es dependiente del estado (utiliza secuencias de turnos) .
Original:
If s is a null pointer, resets its internal conversion state to represent the initial shift state and returns 0 if the current multibyte encoding is not state-dependent (does not use shift sequences) or a non-zero value if the current multibyte encoding is state-dependent (uses shift sequences).
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 al lado de caracteres anchos
Original:
converts the next multibyte character to wide character
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]
devuelve el número de bytes en el siguiente carácter multibyte, estado dado
Original:
returns the number of bytes in the next multibyte 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]