/*********************************************************************************
Copyright(C),Your Company
Author: KimChow
Date: 2021-04-17
Description:c++ 字符串替换
Others:
**********************************************************************************/
#include <iostream>
using namespace std;
int main()
{
string str("asdf1234");
string strTarget("df");
string rep("hehehehehehe");
int pos = str.find(strTarget);
str.replace(pos, strTarget.size(), rep);
cout << str << endl;
return 0;
}
c++ 字符串替换
最新推荐文章于 2024-06-07 20:28:43 发布