/*
用法一:
用s替换指定字符串从起始位置pos开始 长度未为len的字符串
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const double eps = 1e-7;
const int maxn = 5e5 + 5;
const double pi = acos(-1.0);
int main()
{
string s="this is@ a test string!";
s=s.replace(s.find("@"),1,"");
cout<<s<<endl;
}
//this is a test string!
string那些事之replace
猜你喜欢
转载自www.cnblogs.com/Roni-i/p/8997283.html
今日推荐
周排行