This documentation is archived and is not being maintained.

_ismbclegal, _ismbclegal_l, _ismbcsymbol, _ismbcsymbol_l

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at _ismbclegal, _ismbclegal_l, _ismbcsymbol, _ismbcsymbol_l.

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

System_CAPS_ICON_important.jpg Important

This API cannot be used in applications that execute in the Windows Runtime. For more information, see CRT functions not supported with /ZW.

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.

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

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.

RoutineTest conditionCode page 932 example
_ismbclegalValid multibyteReturns 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.
_ismbcsymbolMultibyte symbolReturns nonzero if and only if 0x8141<=c<=0x81AC.

Generic-Text Routine Mappings

Tchar.h routine_UNICODE and _MBCS not defined_MBCS defined_UNICODE defined
_istlegalAlways returns false_ismbclegalAlways returns false.
_istlegal_lAlways returns false_ismbclegal_lAlways returns false.
RoutineRequired header
_ismbclegal,_ismbclegal_l<mbstring.h>
_ismbcsymbol,_ismbcsymbol_l<mbstring.h>

For more compatibility information, see Compatibility.

Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.

Character Classification
_ismbc Routines
is, isw Routines
_ismbb Routines

Show: