Removing certain characters from a string

前端 未结 8 1449
清酒与你
清酒与你 2020-12-05 10:46

I am thinking about using String.replaceAll() to remove certain characters in my string. It is unclear which characters are going to be removed (i.e. which char

8条回答
  •  -上瘾入骨i
    2020-12-05 11:21

    The Guava method is interesting, though I'm not sure why they use the "spread" variable. Since they use that, a subtraction operation is needed for each shift. I benchmarked a few versions (including a simple hand coded shifter) and you can find the writeup here :

    http://thushw.blogspot.com/2013/06/java-remove-specified-characters-from.html

提交回复
热议问题