dromara / hutool

🍬A set of tools that keep Java sweet.
https://hutool.cn
Other
28.91k stars 7.48k forks source link

feat: Add stripAll and fix strip issue #3659

Closed bourne7 closed 1 month ago

bourne7 commented 1 month ago

Current codes:

  1. wrap and unwrap method will remove chars in pair.
  2. strip will remove chars once

In this PR:

  1. add stripAll method to remove all prefixes and suffixes.
  2. fix a bug:
    Assert.assertEquals("", CharSequenceUtil.strip("a", "a", "a"))

    In current version CharSequenceUtil.strip("a", "a", "a") will return "a".

looly commented 1 month ago

记得下次提交到v5-dev分支。

looly commented 1 month ago

这个PR冲突了,我手动合并吧~~

bourne7 commented 1 month ago

好的老哥😁