Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-445

Method "startsWithAny(String str, String[] searchStrs)"

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.5
    • lang.*
    • None

    Description

      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", ...}

      )) [...]
      ----------

      Attachments

        1. commons-lang-startsWithAny2.patch.txt
          3 kB
          Sven Schliesing
        2. commons-lang-startsWithAny.patch.txt
          3 kB
          Sven Schliesing

        Activity

          People

            Unassigned Unassigned
            muffl0n Sven Schliesing
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: