摘要: 函数名: strcspn功 能: 在串中查找第一个给定字符集内容的段用 法: int strcspn(char *str1, char *str2);程序例:#include #include #include int main(void){char *string1 = "1234567890";char *string2 = "747DC8";int length;length = strcspn(string1, string2);printf("Character where strings intersect is at positi 阅读全文
posted @ 2013-07-15 20:24 shouqiang Wei 阅读(173) 评论(0) 推荐(0) 编辑
摘要: #include#include函数名: strncmpi功 能: 将一个串中的一部分与另一个串比较, 不管大小写用 法: int strncmpi(char *str1, char *str2, unsigned maxlen);程序int main(){ char *buf1="AAA",*buf2="aaa"; int pos; pos=strncmpi(buf1,buf2,3); //pos=strcmpi(buf1,buf2); 函数重载 if(pos > 0) printf("buffer 2 is greater than 阅读全文
posted @ 2013-07-15 20:20 shouqiang Wei 阅读(310) 评论(0) 推荐(0) 编辑
摘要: #include#includeint main(){char *buffer1="aaa",*buffer2="bbb",*buffer3="ccc";int pos;pos=strcmp(buffer1,buffer2);if(pos>0){ printf("2>1\n"); } else { printf("1>2\n"); }pos=strcmp(buffer2,buffer3);if(pos>0){ printf("2>3\n"); } 阅读全文
posted @ 2013-07-15 20:13 shouqiang Wei 阅读(320) 评论(0) 推荐(0) 编辑
摘要: int main(void){char string[15];char *ptr, c = 's';strcpy(string, "This is a string");ptr = strchr(string, c);if (ptr)printf("The character %c is at position: %d\n", c, ptr-string);elseprintf("The character was not found\n");return 0;} 阅读全文
posted @ 2013-07-15 20:05 shouqiang Wei 阅读(1075) 评论(0) 推荐(0) 编辑
摘要: #include#includeint main(){char destination[25];char *zhang="zhang ",*er=" er",*xiong=" xiong";strcpy(destination,zhang);//这相当于初始化strcat(destination,er);strcat(destination,xiong);printf("%s\n",destination);return 0;} 阅读全文
posted @ 2013-07-15 19:48 shouqiang Wei 阅读(239) 评论(0) 推荐(0) 编辑
摘要: #include #include int main(){char string[10];char *str="abcdefghij";strcpy(string,str);//strcpy原型//strcpy(char *,const char *);printf("%s\n",string);return 0;} 阅读全文
posted @ 2013-07-15 19:36 shouqiang Wei 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 33、less sample.txt 分页输出文件内容到屏幕 34、/search content (搜索内容) 可以将文档中有searchcontent 的行输出到屏幕35、grep science sample.txt 输出science字符串所在的行,(grep是linux中的一种工具程序,可以用来文件内的查找。)36、grep - i science sample.txt (忽略大小写,输出匹配的行到屏幕)37、grep –v science sample.txt 输出不匹配的行到屏幕。38、grep –n science sample.txt 输出匹配的行并且加上行号,39、grep 阅读全文
posted @ 2013-07-15 19:01 shouqiang Wei 阅读(325) 评论(0) 推荐(0) 编辑
摘要: strong加粗 没有加粗b加粗 加粗 没有加粗i倾斜标签h1标签(标题)em标签(语气 倾斜)u标签(下划线)sub标签(上行)sup标签(下行)s标签(删除线)br标签换行不换段p 第一段;;;;http://bbs.maiyadi.com/forum-593/ 苹果论坛官网 ? Apple 资源&技术交流区? 苹果电脑软件下载http://www.mobiletrain.org/lecture/video/br标签 p第二段标题1标题2标题3标题4标题5标题6屏幕像素的80%80像素屏幕1024像素,宽度1500绝对值,页面出现水平滚动条高度10块引用〈blockquote> 阅读全文
posted @ 2013-07-15 16:26 shouqiang Wei 阅读(359) 评论(0) 推荐(0) 编辑