Everything

mbrlen


Calculates the number of bytes in a specified multibyte character.

[Format]

#include <wchar.h>

size_t mbrlen(const char * restrict s, size_t n, mbstate_t *restrict ps);

[Parameters]

s Pointer to multibyte string

n Maximum number of bytes to be checked for multibyte character

ps Pointer to mbstate_t object

[Return values]

0: A null wide character is detected in n or fewer bytes.

From 1 to n inclusive: A multibyte character is detected in n or fewer bytes.

(size_t)(–2): No complete multibyte character is detected in n bytes.

(size_t)(–1): An illegal multibyte sequence is detected.