commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-848) Improve StringUtils.is(Not)Blank with a CharSequence... version
Date Thu, 24 Oct 2013 19:41:02 GMT

    [ https://issues.apache.org/jira/browse/LANG-848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13804596#comment-13804596
] 

Henri Yandell commented on LANG-848:
------------------------------------

+1.

Let's resolve this one with varargs, then open a separate issue for Iterable APIs, mentioning
this as a use case. I'll get working on both of those.

> Improve StringUtils.is(Not)Blank with a CharSequence... version
> ---------------------------------------------------------------
>
>                 Key: LANG-848
>                 URL: https://issues.apache.org/jira/browse/LANG-848
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.*
>    Affects Versions: 3.1
>            Reporter: Alexander Muthmann
>             Fix For: 3.2, Discussion
>
>
> Currently it's only possible to compare a single CharSequence per is(Not)Blank/is(Not)Empty
call. 
> This should be changed to support multiple CharSequences in a single call.
> {code}
> if(StringUtils.isNotBlank(foo) && StringUtils.isNotBlank(bar) && ...)
> {code}
> could be changed to
> {code}
> if(StringUtils.isNotBlank(foo, bar, ...)
> {code}
> As there are two possible ways to combine the results (AND and OR), it'd be necessary
to create multiple methods.
> {code}
> isAnyBlank(CharSequence... cs)
> isNoneBlank(CharSequence... cs)
> isAnyEmpty(CharSequence... cs)
> isNoneEmpty(CharSequence... cs)
> {code}
> I could implement those methods and contribute them via github if there is any interest
from project's side. 



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message