groovy
  1. groovy
  2. GROOVY-4693

GDK groovydocs for String.padXXX are not very clear [new wording attached]

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.7
    • Fix Version/s: 1.8-rc-2, 1.7.9, 1.9-beta-1
    • Component/s: groovy-jdk
    • Labels:
      None
    • Patch Submitted:
      Yes
    • Number of attachments :
      0

      Description

      I was trying to work out what padLeft etc did from the docs, its not very clear:

      "Pad a String with the characters appended to the left"

      The argument "numberOfCharacters" does not give you the clue that this is the target width.

      I would suggest therefore a change in working in this and related methods:

      "Pad a String to a minimum length specified by numberOfCharacters, with padding characters added to the left."

        Activity

        Paul King made changes -
        Field Original Value New Value
        Assignee Paul King [ paulk ]
        Hide
        Paul King added a comment -

        updated for padLeft, padRight and center

        Show
        Paul King added a comment - updated for padLeft, padRight and center
        Paul King made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.8-rc-2 [ 17176 ]
        Fix Version/s 1.7.9 [ 17164 ]
        Fix Version/s 1.9-beta-1 [ 17153 ]
        Resolution Fixed [ 1 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Paul King
            Reporter:
            Marc Palmer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: