isascii
来源:互联网 发布:手机淘宝在哪里看积分 编辑:程序博客网 时间:2024/05/29 07:20
头文件:#include <ctype.h>
定义函数:int isascii(int c);
函数说明:检查参数c是否为ASCII 码字符,也就是判断c 的范围是否在0 到127 之间。
返回值:若参数c 为ASCII 码字符,则返回true,否则返回NULL(0)。
附加说明:此为宏定义,非真正函数。
举例:判断int i 是否具有对应的ASCII 码字符。
执行结果:
125 is an ascii character:}
126 is an ascii character:~
127 is an ascii character:
128 is not an ascii character
129 is not an ascii character
定义函数:int isascii(int c);
函数说明:检查参数c是否为ASCII 码字符,也就是判断c 的范围是否在0 到127 之间。
返回值:若参数c 为ASCII 码字符,则返回true,否则返回NULL(0)。
附加说明:此为宏定义,非真正函数。
举例:判断int i 是否具有对应的ASCII 码字符。
- #include <ctype.h>
- main(){
- int i;
- for(i = 125; i < 130; i++)
- if(isascii(i))
- printf("%d is an ascii character:%c\n", i, i);
- else
- printf("%d is not an ascii character\n", i);
- }
#include <ctype.h>main(){ int i; for(i = 125; i < 130; i++) if(isascii(i)) printf("%d is an ascii character:%c\n", i, i); else printf("%d is not an ascii character\n", i);}
执行结果:
125 is an ascii character:}
126 is an ascii character:~
127 is an ascii character:
128 is not an ascii character
129 is not an ascii character
0 0
- isascii
- ctype库函数中isascii
- isascii ( )【C语言库函数源代码】
- isascii字符串测试函数应用实例
- C语言字符检测函数:isalnum、isalpha、isascii、iscntrl、isdigit、isgraph、islower、isspace、ispunct、isupper
- isdigit
- PHP Cookie验证
- Mac远程控制Mac和Windows
- iscntrl
- “adb.exe已停止工作”的解决方案(参考)
- isascii
- android广播大全
- log4j 根据日期来生成日志文件
- isalpha
- isalnum
- CI框架源码阅读笔记7 配置管理组件 Config.php
- 用private和public封装函数
- android studio 在线更新android sdk,遇到无法Fetching https://dl-ssl.google.com/...的解决方案
- 安装Chromium浏览器并添加Flash插件Pepper Flash Player