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

Javadoc is incorrect for public static int lastIndexOf(String str, String searchStr)

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.4
    • 3.0
    • lang.*

    Description

      The javadoc's examples show how indexOf should work not lastIndexOf.
      StringUtils.lastIndexOf(null, *) = -1
      StringUtils.lastIndexOf(*, null) = -1
      StringUtils.lastIndexOf("", "") = 0
      StringUtils.lastIndexOf("aabaabaa", "a") = 0
      StringUtils.lastIndexOf("aabaabaa", "b") = 2
      StringUtils.lastIndexOf("aabaabaa", "ab") = 1
      StringUtils.lastIndexOf("aabaabaa", "") = 8

      Attachments

        Activity

          People

            Unassigned Unassigned
            monte75 Sean Montgomery
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: