RFR: JDK-8200436 - String::isBlank

Jeremy Manson jeremymanson at google.com
Tue May 15 18:15:05 UTC 2018


Seems to me that consistency matters here: for Character to call it
whitespace and for String to call it blank is a little weird.

Is there a well-understood definition of "blank string", or did this just
seem like a good name choice?

Jeremy

On Mon, May 14, 2018 at 11:14 PM Remi Forax <forax at univ-mlv.fr> wrote:

> Hi Louis,
> I prefer isBlank to isWhitespace, there is a notion of all characters in
> isBlank that you do not have with isWhitespace.
>
> Rémi
>
> ----- Mail original -----
> > De: "Louis Wasserman" <lowasser at google.com>
> > À: "Xueming Shen" <xueming.shen at oracle.com>
> > Cc: "core-libs-dev" <core-libs-dev at openjdk.java.net>
> > Envoyé: Lundi 14 Mai 2018 22:15:50
> > Objet: Re: RFR: JDK-8200436 - String::isBlank
>
> > It's not clear to me that "isBlank" is a good name for this method.
> > "isWhitespace" might be more appropriate, perhaps.
> >
> > On Mon, May 14, 2018 at 12:48 PM Xueming Shen <xueming.shen at oracle.com>
> > wrote:
> >
> >> +1
> >>
> >> On 5/14/18, 8:25 AM, Jim Laskey wrote:
> >> > New string instance method that returns true if the string is empty or
> >> contains only white space, where white space is defined as any codepoint
> >> returns true when passed to Character::isWhitespace.
> >> >
> >> > webrev: http://cr.openjdk.java.net/~jlaskey/8200436/webrev/index.html
> >> > jbs: https://bugs.openjdk.java.net/browse/JDK-8200436
> >> > csr: https://bugs.openjdk.java.net/browse/JDK-8200437
> >> >
> >>
>


More information about the core-libs-dev mailing list