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

StringUtils.abbreviate description doesn't agree with the examples

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.4
    • None
    • None

    Description

      https://commons.apache.org/proper/commons-lang/javadocs/api-release/org/apache/commons/lang3/StringUtils.html#abbreviate%28java.lang.String,%20int%29

      If str is less than maxWidth characters long, return it.
      Else abbreviate it to (substring(str, 0, max-3) + "...").

      StringUtils.abbreviate("abcdefg", 7) = "abcdefg"

      The first element of the description probably means "less than or equal to"

      Attachments

        Activity

          People

            dmjones500 Duncan Jones
            bjherbison B.J. Herbison
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: