I use this all the time for temporary string replacements:
str = str.replace(substring, 'WoRdToYaMoM');
...Do something else with str then put substring back
str = str.replace('WoRdToYaMoM', substring);
I use this all the time for temporary string replacements:
str = str.replace(substring, 'WoRdToYaMoM');
...Do something else with str then put substring back
str = str.replace('WoRdToYaMoM', substring);