c/c++学习 No.3 ctype.h的使用
来源:互联网 发布:苹果屏幕录像软件 编辑:程序博客网 时间:2024/06/05 20:34
int isalpha(char ch);
- 检查ch是否是字母
- 是字母返回非0(在vs2015中为2) ,否则返回 0
if (isalplha('a')) { //}
int iscntrl(int ch);
- 检查ch是否控制字符(其ASCII码在0和0x1F之间,数值为 0-31)
- 是返回非0,否则返回 0
if (iscntrl('a')) { //}
int isdigit(char ch);
- 检查ch是否是数字(0-9)
- 是返回非0,否则返回0
if (isdigit('1') { //}
int isgraph(int ch);
- 检查ch是否可显示字符(其ASCII码在0x21到0x7E之间),不包括空格
- 是返回非0,否则返回0
if (isgraph('a)) { //}
int islower(int ch);
- 检查ch是否小写字母(a-z)
- 是返回非0,否则返回0
if (islower('a)) { //}
int isupper(int ch);
- 检查ch是否是大写字母(A-Z)
- 是返回非0,否则返回0
if (isupper('A') { //}
int tolower(int ch);
- 将ch字符转换为小写字母
- 返回ch所代表的字符的小写字母
a = tolower(a);
int toupper(int ch);
- 将ch字符转换成大写字母
- 与ch相应的大写字母
a = toupper(a);
int isalnum(int ch);
- 检查ch是否是字母或数字
- 是字母或数字返回非0,否则返回0
if (isalnum('a')) { //}
int isprint(int ch);
- 检查ch是否是可打印字符(包括空格),其ASCII码在0x20到0x7E之间
- 是返回非0,否则返回0
if (isprint('a')) { //}
int ispunct(int ch);
- 检查ch是否是标点字符(不包括空格),即除字母,数字和空格以外的所有可打印字符
- 是返回非0,否则返回0
if (ispunct('a')) { //}
int isspace(int ch);
- 检查ch是否是空格符和跳格符(控制字符)或换行符
- 是返回非0,否则返回0
if (isspace(' ')) { //}
int isxdigit(int ch);
- 检查ch是否是一个16进制数学字符(即0-9,或A-F,或a-f)
- 是返回非0,否则返回0
if (isxdigit('a')) { //}
int isascii(int ch);
- 测试参数是否是ASCII码0-127
- 是返回非0,否则返回0
if (isascii('a)) { //}
0 0
- c/c++学习 No.3 ctype.h的使用
- C/C++: C标准库 ctype.h 的使用
- Linux下C库学习 - ctype.h
- c ctype.h
- c library-ctype.h
- 【C】ctype.h文件
- C语言--ctype.h
- ctype.h里的函数(c语言)
- ctype.h里的函数(c语言)
- C库函数手册(ctype.h)
- [C-Library]ctype.h - isalnum()
- [C-Library]ctype.h - isalpha( )
- [C-Library]ctype.h - iscntrl( )
- [C-Library]ctype.h - isdigit( )
- [C-Library]ctype.h - isgraph( )
- [C-Library]ctype.h - islower( )
- C语言ctype.h库
- C函数库ctype.h操作
- Hibernate
- git 上传代码
- JavaScript中的可枚举属性与不可枚举属性
- TCL学习之字符串函数
- 数据库(第一范式,第二范式,第三范式)
- c/c++学习 No.3 ctype.h的使用
- java中String类和StringBuffer类实例详解
- log4j日志文件乱码问题的解决方法
- Romantic
- # 使用scp从windows拷贝文件到linux服务器 scp(security copy protocol)
- 编译ffmpeg无法生成ffplay的问题解决
- 磁疗有作用吗?恒磁场镇痛的作用机制
- SQLiteDatabase中query、insert、update、delete方法参数说明
- wordpress禁止恶意HTTP_USER_AGENT