I have problem with this task:
User will type some text.
- If text has 'a' triple this letter.
- If text has simply 'd' delete this letter.
- If text has double 'b' write only one 'b'.
I understand this outlines but I do not know how to do it. How should I search text with charAt
? What if I find where it is, where should I write this trippled letter?