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

New append()/insert() methods for StringBuffer

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P5 P5
    • None
    • 1.3.1
    • core-libs
    • generic
    • generic



      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)
      ======================================================================

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: