mblen

Determines the number of bytes comprising the multibyte character.

Library:LibC
Classification:ANSI
Service:General C Services

Syntax

  #include <stdlib.h> 
   
  int mblen (
     const char   *s,   
     size_t       n);
  

Parameters

s

(IN) Points to the array of multibyte characters.

n

(IN) Specifies the number of bytes of the array pointed to by s to be examined.

Return Values

If successful, returns the length, in bytes, of the multibyte character. Otherwise, returns 0 for any of the following conditions:

Returns -1 if a valid multibyte character is not found with the first n bytes in the string.

Remarks

At most, n bytes of the array pointed to by s are examined.

See Also