| 1798 | } |
| 1799 | |
| 1800 | void deleteChar(std::string & s, char c, int moreLettersToDelete) { |
| 1801 | string newString; |
| 1802 | for (unsigned int i = 0; i< s.length(); i++) { |
| 1803 | if (s[i]!=c) { |
| 1804 | newString+=s[i]; |
| 1805 | } else { |
| 1806 | i+=moreLettersToDelete; |
| 1807 | } |
| 1808 | } |
| 1809 | s=newString; |
| 1810 | return; |
| 1811 | } |
| 1812 | |
| 1813 | |
| 1814 | void deleteChar(std::string & s, char c) { |