_ismbclegal, _ismbclegal_l, _ismbcsymbol, _ismbcsymbol_l

Checks whether a multibyte character is a legal or symbol character.

Important

This API cannot be used in applications that execute in the Windows Runtime. For more information, see CRT functions not supported in Universal Windows Platform apps.

Syntax

int _ismbclegal(
   unsigned int c
);
int _ismbclegal_l(
   unsigned int c,
   _locale_t locale
);
int _ismbcsymbol(
   unsigned int c
);
int _ismbcsymbol_l(
   unsigned int c,
   _locale_t locale
);

Parameters

c
Character to be tested.

locale
Locale to use.

Return value

Each of these routines returns a nonzero value if the character satisfies the test condition. Otherwise, they return 0. If c<= 255 and there's a corresponding _ismbb routine (for example, _ismbcalnum corresponds to _ismbbalnum), the result is the return value of the corresponding _ismbb routine.

Remarks

Each of these functions tests a given multibyte character for a given condition.

The versions of these functions with the _l suffix are identical except that they use the locale passed in instead of the current locale for their locale-dependent behavior. For more information, see Locale.

Routine Test condition Code page 932 example
_ismbclegal Valid multibyte Returns nonzero if and only if the first byte of c is within ranges 0x81 - 0x9F or 0xE0 - 0xFC, while the second byte is within ranges 0x40 - 0x7E or 0x80 - FC.
_ismbcsymbol Multibyte symbol Returns nonzero if and only if 0x8141<=c<=0x81AC.

By default, this function's global state is scoped to the application. To change this behavior, see Global state in the CRT.

Generic-text routine mappings

Tchar.h routine _UNICODE and _MBCS not defined _MBCS defined _UNICODE defined
_istlegal Always returns false _ismbclegal Always returns false.
_istlegal_l Always returns false _ismbclegal_l Always returns false.

Requirements

Routine Required header
_ismbclegal, _ismbclegal_l <mbstring.h>
_ismbcsymbol, _ismbcsymbol_l <mbstring.h>

For more compatibility information, see Compatibility.

See also

Character classification
_ismbc routines
is, isw routines
_ismbb routines