In the C Programming Language, the mblen characteristic returns the quantity of bytes in the multibyte persona pointed to with the aid of s.
The syntax for the mblen feature in the C Language is:
int mblen(const char *s, size_t n);
Parameters or Arguments
s The multibyte character in which to calculate the number of bytes. n The range of bytes that will be examined.
Note If s is a null pointer, the mblen feature will initialize the shift state.
The mblen characteristic examines the first n bytes of s and if it varieties a valid character, it returns the variety of bytes in s (as confined via n bytes). If it is not, the mblen feature returns -1. The mblen feature returns zero if s factors to a null character.
In the C Language, the required header for the mblen function is:
In the C Language, the mblen characteristic can be used in the following versions:
Other C functions that are similar to the mblen function:
mbtowc characteristic wctomb function
Other C functions that are noteworthy when dealing with the mblen function:
mbstowcs function setlocale characteristic wcstombs function