I am currently trying to replace a single character in a string with more than one number. Lets make it quick:
replace(string.begin(), string.end(), 'a', '1');
^ WORKS! ^
replace(string.begin(), string.end(), 'a', '11');
or
replace(string.begin(), string.end(), 'a', "1");
^ DOESN'T WORK! ^
How do I do it? Is there any function for it?
NOTE: I'm not asking how to:
- Replace part of a string with another string
- Replace substring withanother substring