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

New append()/insert() methods for StringBuffer

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P5
    • Resolution: Won't Fix
    • Affects Version/s: 1.3.1
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description



      Name: bsT130419 Date: 10/01/2001


      java version "1.3.1_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
      Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)

      It would be useful to have the methods:

        append(String s, int count);
        append(char c, int count);
        insert(int offset, String s, int count);
        insert(int offset, char c, int count);

      in the StringBuffer class. These would repeat the append/insert
      procedure "count" times. Thus for a StringBuffer:

      "72BCD9".append('0', 3) becomes "72BCD9000"
      "72BCD9".insert(0, '0', 3) becomes "00072BCD9"
      "blah".insert(2, '\t', 4) becomes "bl\t\t\t\tah"

      These methods would be useful for inserting leading and trailing padding
      into strings, etc.
      (Review ID: 132887)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mmcclosksunw Michael Mccloskey (Inactive)
              Reporter:
              bstrathesunw Bill Strathearn (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: