wctype

确定字符代码的分类规则。

wctype_t wctype(
   const char * property 
);

参数

  • property
    String 属性

返回值

如果当前区域设置的 LC_CTYPE 类别不定义规则与属性字符串 property的映射,函数返回零。 否则,返回一个非零值都作为第二个参数。随后调用到 towctrans

备注

函数确定字符代码的分类规则。 以下对调用具有相同的行为在所有区域设置 (,但实现可以定义其他排序规则 (“C”区域设置):

功能

和相同。

iswalnum( c )

iswctype( c, wctype( "alnum" ) )

iswalpha( c )

iswctype( c, wctype( "alpha" ) )

iswcntrl( c )

iswctype( c, wctype( "cntrl" ) )

iswdigit( c )

iswctype( c, wctype( "digit" ) )

iswgraph( c )

iswctype( c, wctype( "graph" ) )

iswlower( c )

iswctype( c, wctype( "lower" ) )

iswprint( c )

iswctype( c, wctype( "print" ) )

iswpunct( c )

iswctype( c, wctype( "punct" ) )

iswspace( c )

iswctype( c, wctype( "space" ) )

iswupper( c )

iswctype( c, wctype( "upper" ) )

iswxdigit( c )

iswctype( c, wctype( "xdigit" ) )

要求

例程

必需的标头

wctype

<wctype.h>

有关其他兼容性信息,请参见“简介”中的兼容性

请参见

参考

数据转换

setlocale、_wsetlocale