commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amey Jadiye <ameyjad...@gmail.com>
Subject Re: [lang] Appetite for new method StringUtils.toCamelCase(String str, char delimiter, boolean capitalizeFirstLetter)
Date Mon, 05 Jun 2017 11:18:32 GMT
+1

I like the way of implementation, I think we should have class in Commons
text CaseUtils.toCamelCase(String str, char delimiter, boolean
capitalizeFirstLetter)
Also this can have api for snake case (not sure if java need it)

@chtompki , If you wish I will submit code for review.

Regards,
Amey

On Jun 5, 2017 3:45 PM, "Benedikt Ritter" <britter@apache.org> wrote:

> Hi,
>
> > Am 01.06.2017 um 16:03 schrieb Rob Tompkins <chtompki@gmail.com>:
> >
> > Hello all,
> >
> > Folks at my day job have a method that takes in a space delimited String
> (or arbitrarily delimited string for that matter), and returns a camel
> cased string. Is there any reason that this shouldn’t be in StringUtils? It
> feels reasonable to me. What are folks thoughts?
>
> Sorry to come late to this discussion. We should have a look at Guava’s
> CaseFormat class, which das camel case conversion and more. I think that
> design should lead yours.
> I’ve come to the conclusion that anything that is more complex than
> StringUtils.isEmpty(String) (e.g. needs more than one parameter) should not
> be implemented as a static util method. Such a design always leads to
> procedural style coding which is an anti pattern IMHO.
> CaseFormat is a nice example of how should an API can be build more OOP
> style.
>
> Regards,
> Benedikt
>
> >
> > Cheers,
> > -Rob
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message