isspace()
来源:互联网 发布:淘宝首页psd模板教程 编辑:程序博客网 时间:2024/05/22 11:08
http://blog.csdn.net/youbang321/article/details/7803341
原型:extern int isspace(int c)
用法:#include <ctype.h>
功能:判断字符c是否为空白符
说明:当c为空白符时,返回非零值,否则返回零。(空白符指空格、水平制表、垂直制表、换页、回车和换行符。)
举例:
- /*isspace.c*/
- #include <stdio.h>
- #include <ctype.h>
- #include <string.h>
- int main()
- {
- char s[]="Test Line 1\tend\nTest Line 2\r";
- int i;
- for(i=0;i<strlen(s);i++)
- {
- if(isspace(s[i])) //判断s[i]是否为空白符,若是,则用‘.’替换;若不是,则输出s[i]
- putchar('.');
- else
- putchar(s[i]);
- }
- getchar(); //可删除,只是等待从键盘的输入回车
- return 0;
- }
所有转义字符及对应的含义:
0 0
- isspace
- isspace
- isspace
- isspace()
- isspace
- isspace
- isspace()
- isspace
- isspace()
- isspace() 函数
- isspace函数
- isspace <ctype.h> <cctype>
- isspace(int x)
- linux kernel isspace()
- 二十一 isspace
- python日积月累之isspace()
- python: isspace函数
- isspace ( )【C语言库函数源代码】
- Objective-C 中 判断 NaN
- iOS 学习开发网站
- 怎样在控制台或者日志打印输出JDBC执行的sql语句
- Java链表实现堆栈
- 如何在Web项目中使用Makefile
- isspace()
- Matlab Intro - Image Structure
- width:auto和width:100%的区别
- python 抓取lofterart动态页面
- C++中的locale设置
- UVa 524 - Prime Ring Problem(回溯)
- C#中listview的image添加问题和item双击事件
- Python设计模式——责任链模式
- GreenDao分析概括