arm-linux

http://armboard.taobao.com/

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

2010年9月9日

摘要: 原型:extern int tolower(int c); 用法:#include <ctype.h> 功能:将字符c转换为小写英文字母 说明:如果c为大写英文字母,则返回对应的小写字母;否则返回原来的值。 举例: // tolower.c #include <syslib.h> #include <ctype.h> main() { char *s="Hello, World!"; int i; clrscr(); // clear screen printf("%s/n",s); for(i=0;i<strl 阅读全文
posted @ 2010-09-09 16:44 arm-linux 阅读(391) 评论(0) 推荐(0)

摘要: 原型:extern int isspace(int c); 用法:#include <ctype.h> 功能:判断字符c是否为空白符 说明:当c为空白符时,返回非零值,否则返回零。 空白符指空格、水平制表、垂直制表、换页、回车和换行符。 举例: // isspace.c #include <syslib.h> #include <ctype.h> main() { char s[]="Test Line 1/tend/nTest Line 2/r"; int i; clrscr(); // clear screen for(i=0;i&l 阅读全文
posted @ 2010-09-09 16:42 arm-linux 阅读(335) 评论(0) 推荐(0)

摘要: 原型:extern char *strstr(char *haystack, char *needle); 用法:#include <string.h> 功能:从字符串haystack中寻找needle第一次出现的位置(不比较结束符NULL)。 说明:返回指向第一次出现needle位置的指针,如果没找到则返回NULL。 举例: // strstr.c#include <syslib.h> #include <string.h> main() { char *s="Golden Global View"; char *l="lob 阅读全文
posted @ 2010-09-09 16:41 arm-linux 阅读(645) 评论(0) 推荐(0)