Convert more of the StringUtils API to take CharSequence

Details

Description

Use CharSequence and not String in the StringUtils API for non-mutating operations.

Anything which has to choose between the mutable and immutable nature of CharSequence subclasses (i.e. takes a String and returns a String), should not be changed. Anything that does not mutate the input (even in spirit) should use CharSequence.

Additionally there should be a unit test that uses reflection to confirm this rule is in place.

Wherever possible, use CharSequence and not String in the StringUtils API.

substring can go to subSequence inside code. The general substring method can be replaced with a subSequence method and substring deprecated(?). One question is whether to implement a CharSequence.indexOf type method. Given that it's merely a walking method(?!?), this might be quite handy and would allow a bunch of StringUtils methods to move over.

Wherever possible, use CharSequence and not String in the StringUtils API.

Here is the working list of methods that don't take CharSequence. I'll update the description in place to show status.

Use CharSequence and not String in the StringUtils API for non-mutating operations.

Anything which has to choose between the mutable and immutable nature of CharSequence subclasses (i.e. takes a String and returns a String), should not be changed. Anything that does not mutate the input (even in spirit) should use CharSequence.

Additionally there should be a unit test that uses reflection to confirm this rule is in place.