#include"iostream"
#include"string"
using namespace std ;
int main()
{
// 字符串的查找
string str = "this is a test to find a string";
// 返回的是找到字符串的起始位置。
cout<<str.find("find")<<endl;
// 字符串的替换
string str2="time line!! what meaning";
// 定位要替换的起始位置和结束位置,填入需要改变的字符串。
str2.replace(5,11,"over");
cout<<str2<<endl;
return 0;
}
12-19
400
08-15
1507