Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6542603

(str) StringBuilder.clear() method

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 6
    • core-libs
    • x86
    • windows_2000

      A DESCRIPTION OF THE REQUEST :
      StringBuilder has delete method which requires the start and end positions as parameters. However, there is no easy/simple method for clearing the entire StringBuilder object. It will be nice if there is a method (i.e. clear() ) which wipes out the entire StringBuilder object without passing any parameters when necessary.

      JUSTIFICATION :
      Increase code readability and coding efficiency.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      simple clear method which will do internally the same as delete method without passing any parameters.

            iris Iris Clark
            ryeung Roger Yeung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: