(I'm not a commons-lang user) Java 8 has String.join for the same purpose. https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#join-java.lang.CharSequence-java.lang.CharSequence...- I would deprecate StringUtils.join in favor of String.join.
On Wed, Mar 11, 2020 at 10:16 AM Matt Benson <gudnabr...@gmail.com> wrote: > Definitely +1 if we didn't already do this, except I would put what I call > a "Yoda preposition" in there, e.g. joinBy or joinWith. > > Matt > > On Wed, Mar 11, 2020, 9:00 AM Gary Gregory <garydgreg...@gmail.com> wrote: > > > HI All: > > > > Now that Java's had varargs for a while now, using APIs like > > org.apache.commons.lang3.StringUtils.join(Object[], char) feels backward > to > > me. I want to say: > > > > StringUtils.join('.', "foo", "bar", "bang"); > > > > Not: > > > > StringUtils.join(new String[] { "foo", "bar", "bang" }, '.'); > > > > Any thoughts on deprecating the former for the latter (which would be a > new > > API)? > > > > Gary > > > -- Regards, Tomo