_ismbc 例程_ismbc Routines

每个 _ismbc 例程都针对特定条件测试给定多字节字符 cEach _ismbc routine tests a given multibyte character c for a particular condition.

_ismbcalnum、_ismbcalnum_l、_ismbcalpha、_ismbcalpha_l、_ismbcdigit、_ismbcdigit_l_ismbcalnum, _ismbcalnum_l, _ismbcalpha, _ismbcalpha_l, _ismbcdigit, _ismbcdigit_l _ismbcl0、_ismbcl0_l、_ismbcl1、_ismbcl1_l、_ismbcl2、_ismbcl2_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_ismbcgraph, _ismbcgraph_l, _ismbcprint, _ismbcprint_l, _ismbcpunct, _ismbcpunct_l, _ismbcblank, _ismbcblank_l, _ismbcspace, _ismbcspace_l _ismbclegal、_ismbclegal_l、_ismbcsymbol、_ismbcsymbol_l_ismbclegal, _ismbclegal_l, _ismbcsymbol, _ismbcsymbol_l
_ismbchira、_ismbchira_l、_ismbckata、_ismbckata_l_ismbchira, _ismbchira_l, _ismbckata, _ismbckata_l _ismbclower、_ismbclower_l、_ismbcupper、_ismbcupper_l_ismbclower, _ismbclower_l, _ismbcupper, _ismbcupper_l

备注Remarks

每个 _ismbc 例程的测试结果取决于有效的多字节代码页。The test result of each _ismbc routine depends on the multibyte code page in effect. 多字节代码页具有单字节字母字符。Multibyte code pages have single-byte alphabetic characters. 默认情况下,多字节代码页设置为在程序启动时从操作系统获取的系统默认 ANSI 代码页。By default, the multibyte code page is set to the system-default ANSI code page obtained from the operating system at program startup. 可分别使用 _getmbcp_setmbcp 查询和更改使用中的多字节代码页。You can query or change the multibyte code page in use with _getmbcp or _setmbcp, respectively.

输出值受区域设置的 LC_CTYPE 类别设置影响;有关详细信息,请参阅 setlocaleThe output value is affected by the LC_CTYPE category setting of the locale; see setlocale for more information. 这些不带 _l 后缀的函数版本使用此区域设置相关的行为的当前区域设置;带有 _l 后缀的版本相同,只不过它们使用传递的区域设置参数。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.

例程Routine 测试条件Test condition 代码页 932 示例Code page 932 example
_ismbcalnum、_ismbcalnum_l_ismbcalnum, _ismbcalnum_l 字母数字Alphanumeric 当且仅当 c 是 ASCII 英文字母的单字节表示形式时返回非零值:请参见 _ismbcdigit_ismbcalpha 的示例。Returns nonzero if and only if c is a single-byte representation of an ASCII English letter: See examples for _ismbcdigit and _ismbcalpha.
ismbcalpha、_ismbcalpha\ismbcalpha, _ismbcalpha\ AlphabeticAlphabetic 当且仅当出现以下情况时返回非零值:c 是 ASCII 英文字母的单字节表示形式:查看 _ismbcupper_ismbclower 的示例;或是片假名字母的单字节表示形式:0xA6<=c<=0xDF。Returns 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_l_ismbcdigit, _ismbcdigit_l 数字Digit 当且仅当 c 是 ASCII 数字 0x30<=c<=0x39 的单字节表示形式时返回非零值。Returns nonzero if and only if c is a single-byte representation of an ASCII digit: 0x30<=c<=0x39.
_ismbcgraph、_ismbcgraph_l_ismbcgraph, _ismbcgraph_l 图形Graphic 当且仅当 c 是除空格 () 之外的任何 ASCII 或片假名可打印字符的单字节表示形式时返回非零值。Returns nonzero if and only if c is a single-byte representation of any ASCII or katakana printable character except a white space ( ). 请参阅 _ismbcdigit_ismbcalpha_ismbcpunct 的示例。See examples for _ismbcdigit, _ismbcalpha, and _ismbcpunct.
_ismbclegal、_ismbclegal_l_ismbclegal, _ismbclegal_l 有效的多字节字符Valid multibyte character 当且仅当 c 的第一个字节在 0x81 - 0x9F 或 0xE0 - 0xFC 范围内,同时第二个字节在 0x40 - 0x7E 或 0x80 - FC 范围内时返回非零值。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.
_ismbclower、_ismbclower_l_ismbclower, _ismbclower_l 小写字母Lowercase alphabetic 当且仅当 c 是 ASCII 小写英文字母 0x61<=c<=0x7A 的单字节表示形式时返回非零值。Returns nonzero if and only if c is a single-byte representation of an ASCII lowercase English letter: 0x61<=c<=0x7A.
_ismbcprint、_ismbcprint_l_ismbcprint, _ismbcprint_l 可打印Printable 当且仅当 c 是包括空格 () 的任何 ASCII 或片假名可打印字符的单字节表示形式时返回非零值:查看 _ismbcspace_ismbcdigit_ismbcalpha_ismbcpunct 的示例。Returns 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_l_ismbcpunct, _ismbcpunct_l 标点Punctuation 当且仅当 c 是任何 ASCII 或片假名标点字符的单字节表示形式时返回非零值。Returns nonzero if and only if c is a single-byte representation of any ASCII or katakana punctuation character.
_ismbcblank、_ismbcblank_l,_ismbcblank, _ismbcblank_l, 空格或水平制表符Space or horizontal tab 当且仅当 c 是空格字符或水平制表符的单字节表示形式时,返回非零值:c = 0x20 或 c = 0x09。Returns 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_l_ismbcspace, _ismbcspace_l WhitespaceWhitespace 当且仅当 c 是空白字符 c=0x20 或 0x09<=c<=0x0D 时返回非零值。Returns nonzero if and only if c is a white space character: c=0x20 or 0x09<=c<=0x0D.
_ismbcsymbol、_ismbcsymbol_l_ismbcsymbol, _ismbcsymbol_l 多字节字符Multibyte symbol 当且仅当 0x8141<=c<=0x81AC 时返回非零值。Returns nonzero if and only if 0x8141<=c<=0x81AC.
_ismbcupper、_ismbcupper_l_ismbcupper, _ismbcupper_l 大写字母Uppercase alphabetic 当且仅当 c 是 ASCII 大写英文字母 0x41<=c<=0x5A 的单字节表示形式时返回非零值。Returns nonzero if and only if c is a single-byte representation of an ASCII uppercase English letter: 0x41<=c<=0x5A.

特定于代码页 932 Code Page 932 Specific

下面的例程特定于代码页 932。The following routines are specific to code page 932.

例程Routine 测试条件(仅代码页 932)Test condition (code page 932 only)
_ismbchira、_ismbchira_l_ismbchira, _ismbchira_l 双字节平假名:0x829F<=c<=0x82F1。Double-byte Hiragana: 0x829F<=c<=0x82F1.
_ismbckata、_ismbckata_l_ismbckata, _ismbckata_l 双字节片假名:0x8340<=c<=0x8396。Double-byte katakana: 0x8340<=c<=0x8396.
_ismbcl0、_ismbcl0_l_ismbcl0, _ismbcl0_l JIS 非日本汉字:0x8140<=c<=0x889E。JIS non-Kanji: 0x8140<=c<=0x889E.
_ismbcl1、_ismbcl1_l_ismbcl1, _ismbcl1_l JIS 1 级:0x889F<>c<=0x9872。JIS level-1: 0x889F<=c<=0x9872.
_ismbcl2、_ismbcl2_l_ismbcl2, _ismbcl2_l JIS 2 级:0x989F<=c<=0xEA9E。JIS level-2: 0x989F<=c<=0xEA9E.

_ismbcl0_ismbcl1_ismbcl2 将检查指定值 c 是否匹配上表中所述的测试条件,但不会检查 c 是否为有效的多字节字符。_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. 如果低字节位于范围 0x00 - 0x3F、0x7F 或 0xFD - 0xFF 内,这些函数将返回一个非零值,指明字符满足测试条件。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. 使用 _ismbbtrail、_ismbbtrail_l 来测试是否定义了多字节字符。Use _ismbbtrail, _ismbbtrail_l to test whether the multibyte character is defined.

END 特定于代码页 932 END Code Page 932 Specific

另请参阅See Also

字符分类 Character Classification
is、isw 例程 is, isw Routines
_ismbb 例程_ismbb Routines