osglworks / java-tool

Some simple common Java utilities
Apache License 2.0
52 stars 18 forks source link

StringUtils - add new drop functions #156

Closed greenlaw110 closed 6 years ago

greenlaw110 commented 6 years ago

Add the following new functions:

S.F.dropHead(int n); // when applied drop the first `n` characters from string
S.F.dropHeadIfStartsWith(String prefix); // when applied drop prefix if the string starts with it
S.F.dropTail(int n); // when applied drop the last `n` characters from string
S.F.dropTailIfEndsWith(String suffix); // when applied drop suffix if the string ends with it