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

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 1.4.1
    • Component/s: 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)
      ======================================================================

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: