mbrlen()

Computes the length of a multibyte-encoded character string.

  #include <stdlib.h>
  
  int mbrlen(const char *s, size_t n, mbstate_t * ps);    
Parameter

s

A pointer to a multibyte-encoded character string.

n

The maximum size.

ps

The current state of translation between multibyte and wide character. Ignored if the encoding scheme is non-modal.

Remarks

This function returns the length of the multibyte character pointed to by s. It examines a maximum of n characters. This function operates similarly to mblen() except that it has an additional parameter of type mbstate_t*, which is ignored if the encoding scheme is non-modal.

EWL supports the "C" locale with UTF-8 encoding only. It returns the value of

  mbrtowc(NULL, s, n, ps)