Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 98940 invoked from network); 10 Jun 2008 14:31:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jun 2008 14:31:37 -0000 Received: (qmail 26862 invoked by uid 500); 10 Jun 2008 14:31:38 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 26783 invoked by uid 500); 10 Jun 2008 14:31:38 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 26772 invoked by uid 99); 10 Jun 2008 14:31:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2008 07:31:38 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2008 14:30:57 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 34F18234C137 for ; Tue, 10 Jun 2008 07:30:45 -0700 (PDT) Message-ID: <2028454401.1213108245215.JavaMail.jira@brutus> Date: Tue, 10 Jun 2008 07:30:45 -0700 (PDT) From: "Sven Schliesing (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (LANG-445) Method "startsWithAny(String str, String[] searchStrs)" In-Reply-To: <1550369625.1213091865428.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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.