What is an efficient way to replace many characters in a string?

前端 未结 9 1105
梦谈多话
梦谈多话 2020-12-28 14:31

String handling in Java is something I\'m trying to learn to do well. Currently I want to take in a string and replace any characters I find.

Here is my current inef

9条回答
  •  醉酒成梦
    2020-12-28 14:43

    I doubt, that you can speed up the 'character replacement' at all really. As for the case of regular expression replacement, you may compile the regexs beforehand

提交回复
热议问题