isleadbyte, _isleadbyte_l


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

The latest version of this topic can be found at isleadbyte, _isleadbyte_l.

Determines whether a character is the lead byte of a multibyte 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 isleadbyte(  
   int c   
int _isleadbyte_l(  
   int c   


Integer to test.

isleadbyte returns a nonzero value if the argument satisfies the test condition or 0 if it does not. In the "C" locale and in single-byte character set (SBCS) locales, isleadbyte always returns 0.

The isleadbyte macro returns a nonzero value if its argument is the first byte of a multibyte character. isleadbyte produces a meaningful result for any integer argument from –1 (EOF) to UCHAR_MAX (0xFF), inclusive.

The expected argument type of isleadbyte is int; if a signed character is passed, the compiler may convert it to an integer by sign extension, yielding unpredictable results.

The version of this function with the _l suffix is identical except that it uses the locale passed in instead of the current locale for its locale-dependent behavior.

Generic-Text Routine Mappings

TCHAR.H routine_UNICODE & _MBCS not defined_MBCS defined_UNICODE defined
_istleadbyteAlways returns false_ isleadbyteAlways returns false
RoutineRequired header

For additional compatibility information, see Compatibility.

Not applicable, but see System::Globalization::CultureInfo.

Byte Classification
_ismbb Routines