C标准库头文件—ctype.h

·ctype.hC标准函数库中的头文件,定义了一批C语言字符分类函数(C character classification functions),用于测试字符是否属于特定的字符类别,如字母字符、控制字符等等。既支持单字节(Byte)字符,也支持宽字符。

#include<ctype.h>

主要函数简介:

islower
函数名称: islower
函数原型: int islower(int ch);
函数功能: 检查ch是否小写字母(a-z)
函数返回: 是返回非0,否则返回0

isupper
函数名称:  isupper
函数原型: int isupper(int ch);
函数功能: 检查ch是否是大写字母(A-Z)
函数返回: 是返回非0,否则返回0

tolower

函数名称: tolower
函数原型: int tolower(int ch);
函数功能: 将ch字符转换为小写字母
函数返回: 返回ch所代表的字符的小写字母


toupper
函数名称: toupper
函数原型: int toupper(int ch);
函数功能: 将ch字符转换成大写字母
函数返回: 与ch相应的大写字母

isdigit
函数名称: isdigit
函数原型: int isdigit(char ch);
函数功能: 检查ch是否是数字(0-9)
函数返回: 是返回非0,否则返回0

猜你喜欢

转载自blog.csdn.net/weixin_42153410/article/details/80412183