I want to replace some characters with accents in String, like this example:
str.replace('รก','a'); str.replace('รข','a'); str.replace('รฃ','a');
This will work, but I want to know if there is some easy way to pass all the characters that need to be replaced, and the char that will replace them. Something like that:
replace(str,"รกรขรฃ",'a');
or
char[] chars = {'รก','รข','รฃ'}; replace(str,chars,'a');
I looked at StringUtils from Apache Lang , but not the way I mentioned.
source share