Otherwise I doubt the cost... ________________________________ From: Xeno Amess <xenoam...@gmail.com> Sent: Monday, March 20, 2023 7:00:14 PM To: Commons Developers List <dev@commons.apache.org> Subject: Re: [lang] Considering a new String utility class
I agree if it doesn't hurt more than 5% performance. ________________________________ From: Peter Verhas <pe...@verhas.com> Sent: Monday, March 20, 2023 4:16:17 PM To: Commons Developers List <dev@commons.apache.org> Subject: Re: [lang] Considering a new String utility class A few years ago when I refactored some code in this project, I created such a class for myself, as I was experimenting at that time with how to generate fluent API automatically. I will look it up where it is and give here a pointer. That may be a starting point and as you can guessed from the fact that I started to create something like that for myself I welcome this idea. I also submitted at some conferences talks on how to create a fluent API front-end for Apache Commons Strings, but no one liked the idea as a conference talk. On Wed, Mar 15, 2023 at 1:58 PM Gary Gregory <garydgreg...@gmail.com> wrote: > PRs and issues like "[LANG-1682] Adding new startsWithAnyIgnoreCase > method and tests cases" keep popping up from time to time. > > My preference is to stop adding APIs that are variations of other APIs > based on case sensitivity (and Charset, Locale, and so on). > > Instead, I can see adding a new String utility class that tracks such > attributes on its instance such that you'd say something like: > - Strings.caseSensitive().someOperation(...) > - Strings.caseInsensitive().someOperation(...). > > The 2 above would access pre-built instances probably. A builder would > let you build an instance that your app can cache: > Strings.builder().setCaseSensitivity(true).setCharset(...).build(); > > An instance of Strings or whatever to call such a class would track > case sensitivity, a Locale, and maybe an input and output Charset, I'm > not 100% sure yet. But you get the idea I hope. > > Any thoughts? > > Gary > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > > -- Peter Verhas pe...@verhas.com t: +41791542095 skype: verhas