字符串的STL
#include<bits/stdc++.h>
using namespace std;
int main(){
string str="iloveyou";
str.insert(3,"h");//insert 在下标为3的字符前面插入一个字符串
cout<<str<<endl;//ilohveyou
cout<<str.find("you")<<endl;//返回找到字符子串的第一个下标索引,找不到会一个诡异的数字(反正比字符串长)
//输出6
string str1=str.substr(3,3);//从第一个参数下标开始截取,截取n个的字符,n为第二个参数的大小
cout<<str1;//hve
}