Export (0) Print
Expand All
div
eof
Expand Minimize

_ismbslead, _ismbstrail, _ismbslead_l, _ismbstrail_l 

Perform context-sensitive tests for multibyte-character string lead and trail bytes and determine whether a given substring pointer points to a lead byte or a trail byte.


int _ismbslead(
   const unsigned char *str,
   const unsigned char *current 
);
int _ismbstrail(
   const unsigned char *str,
   const unsigned char *current 
);
int _ismbslead_l(
   const unsigned char *str,
   const unsigned char *current,
   _locale_t locale
);
int _ismbstrail_l(
   const unsigned char *str,
   const unsigned char *current,
   _locale_t locale
);

Parameters

str

Pointer to the start of the string or previous known lead byte.

current

Pointer to the position in the string to be tested.

locale

Locale to use.

_ismbslead and _ismbstrail return –1 if the character is a lead or trail byte, respectively. If the input strings are valid strings but not a lead or trail byte, these functions return zero. If either argument is NULL, the invalid parameter handler is invoked, as described in Parameter Validation. If execution is allowed to continue, these functions return NULL and set errno to EINVAL.

_ismbslead and _ismbstrail are slower than the _ismbblead and _ismbbtrail versions because they take the string context into account.

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.

Routine Required header Optional header Compatibility

_ismbslead

<mbctype.h> or <mbstring.h>

<ctype.h>,* <limits.h>, <stdlib.h>

Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003

_ismbstrail

<mbctype.h> or <mbstring.h>

<ctype.h>,* <limits.h>, <stdlib.h>

Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003

_ismbslead_l

<mbctype.h> or <mbstring.h>

<ctype.h>,* <limits.h>, <stdlib.h>

Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003

_ismbstrail_l

<mbctype.h> or <mbstring.h>

<ctype.h>,* <limits.h>, <stdlib.h>

Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003

* For manifest constants for the test conditions.

For more compatibility information, see Compatibility in the Introduction.

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

Community Additions

ADD
Show:
© 2014 Microsoft