- 博客(4)
- 资源 (2)
- 收藏
- 关注
原创 字符串翻转
<br />#include <stdio.h> #include <string.h> void reverse_string(char *str) { char *lastchar; char tmp; for (lastchar = str; *lastchar != '/0'; lastchar++) ; lastchar--; while (str < lastchar) { tmp = *s
2010-06-03 20:14:00 601
原创 删除子串
<br />/*判断第二个字符串是否为第一字符串的子串,如果是,则将该子串删除 比如 bissrc = a123afed littlesrc = afe; 返回a123d; */ #include <stdio.h> #include <string.h> #include <stdlib.h> //判断一个字符串是否为另一个的子串,如果是,返回该子串首字母所在的位置 //如果不是,返回-1。 int findsubstring(char bigsrc[], const char
2010-06-03 20:13:00 998
原创 查找字符串
<br />#include <stdio.h> #include <string.h> typedef int BOOL; #define true 1 #define false 0 BOOL findsubstring(const char *bigsrc, const char *littlesrc) { int flagbig = 0; //记录是否至少进行了一次比较 int flaglittle = 0;
2010-06-03 20:11:00 595
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人