第一知识网
www.001rz.com如何在c++的字符串中删除某个字符串
日期:2016-11-11 18:47:26 人气:4
利用C的strstr函数查找字符串,然后strcpy拷贝覆盖它。
#include
int main() {
char s1[] = "This string is used for testing strstr() function";
char s2[] = "used for";
char *s3;
s3 = strstr(s1, s2);
int p1 = s3-s1;
strcp