下面通过代码给大家介绍c++ string insert() 函数,具体内容如下:
basic_string& insert (size_type pos, const basic_string& str);
在原串下标为pos的字符前插入字符串str
basic_string& insert (size_type pos, const basic_string& str, size_type pos1, size_type n);
str从下标为pos1开始数的n个字符插在原串下标为pos的字符前
basic_string& insert (size_type pos, size_typ