commons-lang icon indicating copy to clipboard operation
commons-lang copied to clipboard

[LANG-1682] Adding new startsWithAnyIgnoreCase method and tests cases

Open laurentschoelens opened this issue 1 year ago • 5 comments

Adding new method startsWithAnyIgnoreCase method for case-insensitive version of startsWithAny

laurentschoelens avatar Mar 14 '23 13:03 laurentschoelens

My preference is to stop adding APIs that are variations of other APIs based on the casing (and encoding and so on). In the longer term, I can see adding a new String utility class that tracks such an attribute on its instance such that you'd say something like Strings.caseSensitive().someOperation(...) and Strings.caseInsensitive().someOperation(...).

garydgregory avatar Mar 15 '23 12:03 garydgregory

Thanks for the reply. Is there any plans for this ? It's huge refactoring.

laurentschoelens avatar Mar 15 '23 12:03 laurentschoelens

It's something I'd like to do and might take a swing at when I am on vacation in April...

garydgregory avatar Mar 15 '23 12:03 garydgregory

Like you expose the calling to this new Strings class, it looks like you're creating new instance (like a builder) and that should lead to memory impact and performances issues (as I see it)

laurentschoelens avatar Mar 15 '23 12:03 laurentschoelens

Like you expose the calling to this new Strings class, it looks like you're creating new instance (like a builder) and that should lead to memory impact and performances issues (as I see it)

If not, this could lead to thread-safety issues. But again I don't know what you want to do

laurentschoelens avatar Mar 15 '23 12:03 laurentschoelens