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

StringBuffer.append(StringBuffer sb, int offset, int len) missing

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.1
    • core-libs



      Name: jl125535 Date: 08/20/2003


      A DESCRIPTION OF THE REQUEST :
      To append a part of a StringBuffer to another StringBuffer it is
      currently necessary to create a String representing the part by using
      StringBuffer.subString().

      JUSTIFICATION :
      Having the above mentioned function would speed up
      copying bits and pieces from one StringBuffer to another
      without creating intermediate String objects.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      StringBuffer src = new StringBuffer();
      StringBuffer dest = new StringBuffer();
      ...
      dest.append(src, 10, 2)

      should suffice to pick two characters at offset 10 from src and append
      them to dest.

      ACTUAL -
      Currently I have to write

      dest.append(src.substring(10,12))

      (Incident Review ID: 186114)
      ======================================================================

            mmcclosksunw Michael Mccloskey (Inactive)
            jleesunw Jon Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: