mblen
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 <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.
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.
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.
You can help to correct and verify the translation. Click here for instructions.
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.
You can help to correct and verify the translation. Click here for instructions.
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. |
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.
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.
You can help to correct and verify the translation. Click here for instructions.
Ejemplo
| Esta sección está incompleta Razón: sin ejemplo |
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) | |
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) | |
Documentación de C++ para mblen
| |