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

    • Type: Task
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 3.0
    • Component/s: lang.*
    • Labels:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: