_mbsbtype

int_mbsbtype(constunsignedchar*mbstr,size_tcount );

Routine Required Header Optional Headers Compatibility
_mbsbtype <mbstring.h> <mbctype.h>1 Win 95, Win NT

1 For manifest constants used as return values.

For additional compatibility information, see Compatibility in the Introduction.

Libraries

LIBC.LIB Single thread static library, retail version
LIBCMT.LIB Multithread static library, retail version
MSVCRT.LIB Import library for MSVCRT.DLL, retail version

Return Value

_mbsbtype returns an integer value indicating the result of the test on the specified byte. The manifest constants in the following table are defined in MBCTYPE.H.

Return Value Byte Type
_MBC_SINGLE (0) Single-byte character. For example, in code page 932, _mbsbtype returns 0 if the specified byte is within the range 0x20 – 0x7E or 0xA1 – 0xDF.
_MBC_LEAD (1) Lead byte of multibyte character. For example, in code page 932, _mbsbtype returns 1 if the specified byte is within the range 0x81 – 0x9F or 0xE0 – 0xFC.
_MBC_TRAIL (2) Trailing byte of multibyte character. For example, in code page 932, _mbsbtype returns 2 if the specified byte is within the range 0x40 – 0x7E or 0x80 – 0xFC.
_MBC_ILLEGAL (–1) Invalid character, or NULL byte found before the byte at offset count in mbstr.

Parameters

mbstr

Address of a sequence of multibyte characters

count

Byte offset from head of string

Remarks

The _mbsbtype function determines the type of a byte in a multibyte character string. The function examines only the byte at offset count in mbstr, ignoring invalid characters before the specified byte.

Byte Classification