数据结构示例之字符串替换

如下为“字符串替换”的简单示例:spa 1. 用c语言实现的版本code #include<stdio.h> /* 在字符串中指定位置开始替换子字符串 */ char *strreplace(char *s1, char *s2, int pos) { --pos; int i = 0, j = pos; for ( ; s1[j] != '\0'; ++j) { if (s2[i]
相关文章
相关标签/搜索