Guardian C Library Calls Reference Manual
mblen
3-114 128833—Guardian TNS C Library Calls Reference Manual
Reference to Library Calls
mblen
The mblen function determines the length in bytes of a multibyte character.
s
points to the multibyte character.
n
defines the maximum length in characters of the multibyte character.
Return Value
If s is a null pointer, the return value is 0.
If s is not a null pointer, the return value is:
Usage Guidelines
•
The behavior of the mblen function is affected by the LC_CTYPE category of the
current locale.
#include <stdlibh>
int mblen(const char *s, size_t n);
0
if s points to a null character
1
if s points to a one-byte character, different from null
2
if s points to the first byte of a two-byte character
-1
if none of the above is true