c++string中的插入和删除

函数原型:
string& insert(int pos, const char* s); //插入字符串
string& insert(int pos, const string& str); //插入字符串
string& insert(int pos, int n, char c); //在指定位置插入n个字符c
string& erase(int pos, int n = npos); //删除从Pos开始的n个字符
posted @ 2022-05-08 14:42  纸包鱼  阅读(204)  评论(0)    收藏  举报