I need to do something like this dreamed .trReplace
:
str = str.trReplace(\"áéíüñ\",\"aeiu&\");
It should change this str
What you want is a way to go through the string once and do all the replacements. I am not not sure that regex is the best way to do it if you want efficiency. It could very well be that a case switch (for all the characters that you want to replace) in a for loop to test every character is faster. I would profile the two approaches.