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] [Updated] (LANG-733) Add containsAny(CharSequence cs, CharSequence... searchChars) to StringUtils
Date Tue, 02 Aug 2011 05:04:27 GMT

     [ https://issues.apache.org/jira/browse/LANG-733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Henri Yandell updated LANG-733:
-------------------------------

    Fix Version/s:     (was: 3.0.1)
                   3.x

It would mean changing the containsAny(CharSequence, CharSequence) method; in which the 2nd
CharSequence acts as an array of single chars. 

The second method, containsIgnoreCase(CharSequence, CharSequence...) seems fair, and simple
to implement. Need to confirm whether or not there's an effect on binary compat.

(Moving to 3.x as no patches available yet/no decision that this should be fixed yet)

Here's the full API for StringUtils.contains*.  I've no idea why I missed the containsOnly
and containsNone String parameters. Ugh.

    public static boolean contains(CharSequence seq, int searchChar) {
    public static boolean contains(CharSequence seq, CharSequence searchSeq) {
    public static boolean containsIgnoreCase(CharSequence str, CharSequence searchStr) {
    public static boolean containsWhitespace(CharSequence seq) {
    public static boolean containsAny(CharSequence cs, char... searchChars) {
    public static boolean containsAny(CharSequence cs, CharSequence searchChars) {
    public static boolean containsOnly(CharSequence cs, char... valid) {
    public static boolean containsOnly(CharSequence cs, String validChars) {
    public static boolean containsNone(CharSequence cs, char... searchChars) {
    public static boolean containsNone(CharSequence cs, String invalidChars) {


> Add containsAny(CharSequence cs, CharSequence... searchChars) to StringUtils
> ----------------------------------------------------------------------------
>
>                 Key: LANG-733
>                 URL: https://issues.apache.org/jira/browse/LANG-733
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>    Affects Versions: 3.0
>            Reporter: Eugen Paraschiv
>             Fix For: 3.x
>
>
> This method is missing from StringUtils. The corresponding method: 
> public static boolean containsAny(CharSequence cs, char... searchChars) {
> does exist, so this was probably just forgotten. 
> Also
> public static boolean containsIgnoreCase(CharSequence str, CharSequence... searchStr)
{
> needs to be added as well.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message