commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sven Schliesing (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LANG-445) Method "startsWithAny(String str, String[] searchStrs)"
Date Tue, 10 Jun 2008 14:30:45 GMT

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

Sven Schliesing commented on LANG-445:
--------------------------------------

I'm not stuck on 1.3. In fact I'm using 1.6. 

But I don't understand your argument "available through regular expressions". I think there
are plenty of methods in commons-lang that you could replace with regexp. Like startsWith(),
just to name one.

> Method "startsWithAny(String str, String[] searchStrs)"
> -------------------------------------------------------
>
>                 Key: LANG-445
>                 URL: https://issues.apache.org/jira/browse/LANG-445
>             Project: Commons Lang
>          Issue Type: New Feature
>            Reporter: Sven Schliesing
>            Priority: Minor
>
> Similar to 
> http://commons.apache.org/lang/apidocs/org/apache/commons/lang/StringUtils.html#indexOfAny(java.lang.String,%20java.lang.String[])
> To replace
> ----------
> if (StringUtils.startsWith(foo, "bar") || StringUtils.startsWith(foo, "baz") || ...)
[...]
> ----------
> with
> ----------
> if (StringUtils.startsWithAny(foo, new String[] {"bar", "baz", ...})) [...]
> ----------

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message