commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <>
Subject [jira] [Commented] (LANG-883) StringUtils.containsAny(CharSequence, CharSequence... )
Date Fri, 12 Apr 2013 08:49:16 GMT


Henri Yandell commented on LANG-883:

I think this would be better as CharSetUtils.containsAny(String, String), as what you're describing
is what we've called a charset (ie: a probably loose implementation of the character class
part of regexp). Currently you'd have to implement it as if(CharSetUtils.count("foo","aoeiu")
> 0), so not much code but a little odd.
> StringUtils.containsAny(CharSequence, CharSequence... )
> -------------------------------------------------------
>                 Key: LANG-883
>                 URL:
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>    Affects Versions: 3.1
>            Reporter: Ivan Hristov
>            Priority: Trivial
> Presently there is a: public static boolean containsAny(CharSequence cs, char... searchChars).
It would be useful to have the: public static boolean containsAny(CharSequence cs, CharSequence...
searchCharSequences) which will return true if any of the searchCharSequences are contained
within the cs. If you decide to implement it, it would be nice to have an alias method for
collections, e.g., public static boolean containsAny(CharSequence cs, Collection<CharSequence>

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message