String的相关操作
int main()
{
string str = "abcde";
string sub = str.substr(0, 1); //a
char findstr = str[str.find('b')]; //b
for (auto &c : str)
{
toupper(c); //遍历char转大写
}
for (auto &c : str)
{
tolower(c);//遍历char转小写
}
reverse(str.begin(), str.end());
string reverstr(str);//edcba
const char *transTOchar = str.c_str();//edcba
char *cstr = "kkkkk";
string ctostr(cstr);//kkkkk 但c++不推荐
}