Most efficient way to use replace multiple words in a string [duplicate]

This functionality is already implemented in Commons Lang‘s StringUtils class.

StringUtils.replaceEach(String text, String[] searchList, String[] replacementList)

Leave a Comment