常用头文件-字符处理-<cctype>

<cctype>中定义的函数:

isalnum(a)  如果c是字母或数字,则为true。

isalpha(a)  如果c是字母,则为true。

iscntrl(c)  如果c是控制字符,则为true。

isdigit(c)  如果c是数字,则为true。

isgraph(c)  如果c不是空格,但可打印,则为true。

islower(c)  如果c是小写字母,则为true。

isprint(c)  如果c是可打印的字符,则为true。

ispunct(c)  如果c是标点符号,则为true。

isspace(c)  如果c是空白字符,则为true。

isupper(c)  如果c是大写字母,则为true。

isxdigit(c)  如果c是十六进制数,则为true。

tolower(c)  如果c是大写字母,则返回小写字母形式,否则直接返回c。

toupper(c)  如果c是小写字母,则返回大写字母形式,否则直接返回c。

 

 

posted on 2012-04-13 13:00  NLP新手  阅读(341)  评论(0编辑  收藏  举报

导航