字符串替换, src 源字符串, buf_size 缓冲大小, search搜索的字符串大小, repstr 需要替换成的字符串 int str_replace(char *src, unsigned int buf_size, char* search, char *repstr) { if(!src || !search || !repstr|| buf_size < 0) { return -1; } const unsigned int size = buf_size + 1024 ;…