Borland C++ reference

mblen

raw OCR

Determines the length of a multibyte character.

Defined in header <stdlib.h>

Syntax

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

Portability

DOSUNIXWindowsANSI CC++ only
■■■

Remarks

If s is not NULL, mblen determines the multibyte character pointed to by

s. The maximumnumber of bytes examined is specified by n.
The behavior of mblen is affected by the setting of LCCTYPEcategory of

the current locale.

Return value

If s is null, mblen returns a nonzero value if multibyte characters have state-dependent encodings. Otherwise, mblen returns zero.

If s is not null, mblen returns the following:

zero if s points to the null character;

-1if the next n bytes do not comprise a valid multibyte character;

the number of bytes that comprise a vaHd multibyte charter.

See also

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.