![]() Let’s use this to remove all occurrences of spaces from the string i.e. Then call the string::erase() function to delete that part of the string. So, to delete all occurrences of a character from a string, we can call the remove() function to shift the matching characters to the end of the string. One of the overloaded versions of string::erase() functions accepts two iterators as arguments and deletes the sequence of characters in the range [first,last). ![]() Iterator string::erase(iterator first, iterator last)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |