Skip to main content
Jhon Carlo
Inspiring
October 13, 2014
Answered

Change a characters in a text

  • October 13, 2014
  • 3 replies
  • 392 views

I need to change a character at a time, with buttons, in a text, for example:

abcdefg

With button 1) change only the letter "a" but not the other letters;

With button 2) change only the letter "b" but not the other letters;

etc.

I have seen several methods that are not in my case.

I would like some advice to know, except obviously  the script of buttons, what is the easiest method to solve this problem.

Thanks.

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Ned Murphy

You can look into using the String.replace() method.  Another option is to just use String.split(remove_letter).join(replacement);

3 replies

Ned Murphy
Ned MurphyCorrect answer
Legend
October 14, 2014

You can look into using the String.replace() method.  Another option is to just use String.split(remove_letter).join(replacement);

Jhon Carlo
Inspiring
October 14, 2014

Thank you Ned, you helped me find the solution! 

Ned Murphy
Legend
October 14, 2014

You're welcome Jhon