_ismbc Routines

 

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

Each _ismbc routine tests a given multibyte character c for a particular condition.

_ismbcalnum, _ismbcalnum_l, _ismbcalpha, _ismbcalpha_l, _ismbcdigit, _ismbcdigit_l_ismbcl0, _ismbcl0_l, _ismbcl1, _ismbcl1_l, _ismbcl2, _ismbcl2_l
_ismbcgraph, _ismbcgraph_l, _ismbcprint, _ismbcprint_l, _ismbcpunct, _ismbcpunct_l, _ismbcblank, _ismbcblank_l, _ismbcspace, _ismbcspace_l_ismbclegal, _ismbclegal_l, _ismbcsymbol, _ismbcsymbol_l
_ismbchira, _ismbchira_l, _ismbckata, _ismbckata_l_ismbclower, _ismbclower_l, _ismbcupper, _ismbcupper_l

The test result of each _ismbc routine depends on the multibyte code page in effect. Multibyte code pages have single-byte alphabetic characters. By default, the multibyte code page is set to the system-default ANSI code page obtained from the operating system at program startup. You can query or change the multibyte code page in use with _getmbcp or _setmbcp, respectively.

The output value is affected by the LC_CTYPE category setting of the locale; see setlocale for more information. The versions of these functions without the _l suffix use the current locale for this locale-dependent behavior; the versions with the _l suffix are identical except that they use the locale parameter passed in instead.

RoutineTest conditionCode page 932 example
_ismbcalnum, _ismbcalnum_lAlphanumericReturns nonzero if and only if c is a single-byte representation of an ASCII English letter: See examples for _ismbcdigit and _ismbcalpha.
_ismbcalpha, _ismbcalpha_AlphabeticReturns nonzero if and only if c is a single-byte representation of an ASCII English letter: See examples for _ismbcupper and _ismbclower; or a katakana letter: 0xA6<=c<=0xDF.
_ismbcdigit, _ismbcdigit_lDigitReturns nonzero if and only if c is a single-byte representation of an ASCII digit: 0x30<=c<=0x39.
_ismbcgraph, _ismbcgraph_lGraphicReturns nonzero if and only if c is a single-byte representation of any ASCII or katakana printable character except a white space ( ). See examples for _ismbcdigit, _ismbcalpha, and _ismbcpunct.
_ismbclegal, _ismbclegal_lValid multibyte characterReturns 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.
_ismbclower, _ismbclower_lLowercase alphabeticReturns nonzero if and only if c is a single-byte representation of an ASCII lowercase English letter: 0x61<=c<=0x7A.
_ismbcprint, _ismbcprint_lPrintableReturns nonzero if and only if c is a single-byte representation of any ASCII or katakana printable character including a white space ( ): See examples for _ismbcspace, _ismbcdigit, _ismbcalpha, and _ismbcpunct.
_ismbcpunct, _ismbcpunct_lPunctuationReturns nonzero if and only if c is a single-byte representation of any ASCII or katakana punctuation character.
_ismbcblank, _ismbcblank_l,Space or horizontal tabReturns nonzero if and only if c is a single-byte representation of a space character or a horizontal tab character: c=0x20 or c=0x09.
_ismbcspace, _ismbcspace_lWhitespaceReturns nonzero if and only if c is a white space character: c=0x20 or 0x09<=c<=0x0D.
_ismbcsymbol, _ismbcsymbol_lMultibyte symbolReturns nonzero if and only if 0x8141<=c<=0x81AC.
_ismbcupper, _ismbcupper_lUppercase alphabeticReturns nonzero if and only if c is a single-byte representation of an ASCII uppercase English letter: 0x41<=c<=0x5A.

Code Page 932 Specific

The following routines are specific to code page 932.

RoutineTest condition (code page 932 only)
_ismbchira, _ismbchira_lDouble-byte Hiragana: 0x829F<=c<=0x82F1.
_ismbckata, _ismbckata_lDouble-byte katakana: 0x8340<=c<=0x8396.
_ismbcl0, _ismbcl0_lJIS non-Kanji: 0x8140<=c<=0x889E.
_ismbcl1, _ismbcl1_lJIS level-1: 0x889F<=c<=0x9872.
_ismbcl2, _ismbcl2_lJIS level-2: 0x989F<=c<=0xEA9E.

_ismbcl0, _ismbcl1, and _ismbcl2 check that the specified value c matches the test conditions described in the preceding table, but do not check that c is a valid multibyte character. If the lower byte is in the ranges 0x00 – 0x3F, 0x7F, or 0xFD – 0xFF, these functions return a nonzero value, indicating that the character satisfies the test condition. Use _ismbbtrail, _ismbbtrail_l to test whether the multibyte character is defined.

END Code Page 932 Specific

Character Classification
is, isw Routines
_ismbb Routines

Show: