marcus.x的博客

2014年3月19日

C语言实现 字符串过滤并修改并返回个数

摘要: 基本问题:给定一个strContent,strWord,使用strWord 匹配strContent,匹配成功,将匹配部分全部替换为‘*’ ,并返回匹配成功个数。注意不能使用库函数。例如:strContent ="today is sunday." strWord = "day" 那么应该返回2,而且strContent变成 "to*** is sun***."问题不难,但是对我来说有些考验。#include #include #include // 用来测试,输入数据用的,题目要求不能使用库函数int filter(char *st 阅读全文

posted @ 2014-03-19 23:05 marcus.x 阅读(796) 评论(0) 推荐(0) 编辑

导航