Groovy
  1. Groovy
  2. GROOVY-4693

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

    Details

    • Type: Improvement Improvement
    • Status: 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
    • Flags:
      Patch

      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

        Marc Palmer created issue -
        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 -
        Resolution Fixed [ 1 ]
        Fix Version/s 1.8-rc-2 [ 17176 ]
        Fix Version/s 1.9-beta-1 [ 17153 ]
        Fix Version/s 1.7.9 [ 17164 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12733624 ] Default workflow, editable Closed status [ 12745391 ]
        Mark Thomas made changes -
        Patch Submitted Yes [ 10763 ]
        Flags Patch [ 10430 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12967798 ] Default workflow, editable Closed status [ 12975395 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        6h 59m 1 Paul King 23/Feb/11 16:30
        Resolved Resolved Closed Closed
        16d 8h 16m 1 Paul King 12/Mar/11 00:46

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development