append
+=
1 | string name ("John"); |
append
1 | string name ("John"); |
push_back
1 | string line ("This is a line."); |
erase
erase
1 | str.erase(pos, len); |
pop_back
1 | str.pop_back(); |
find
find string
1 | str.find(str2); // return iterator |
find charactor
1 | str.find_first_of(char); // return iterator |
substr
1 | str.substr(pos, len); |