您的位置首页百科知识

isalpha函数作用是什么?

isalpha函数作用是什么?

isalpha函数的作用是:判断字符ch是否为英文字母。若为英文字母,返回非0(小写字母为2,大写字母为1)。若不是字母,则返回0。

在标准c中,它相当于使用“ isupper( ch ) || islower( ch ) ”做测试。