char* strrep(const char* src, const char* from, const char* to){
}
#include <string.h>
#include <malloc.h>char* strrep(const char* src, const char* from, const char* to)
{
char *des, *des_cur;
int from_len, to_len, src_len, des_len;
const char *src_cur, *src_end, *occ;
const char **marks;
int mark_len, m, rep_count;
// prepare from_len = strlen(from);
to_len = strlen(to);
src_len = strlen(src);
if (from_len == 0)
return strdup(src);
// mark all occ......
阅读全文