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)
======================================================================
- duplicates
-
JDK-4882816 StringBuffer.append(StringBuffer source, int offset, int len) wanted
-
- Closed
-