A DESCRIPTION OF THE REQUEST :
StringBuilder has delete method which requires the start and end positions as parameters. However, there is no easy/simple method for clearing the entire StringBuilder object. It will be nice if there is a method (i.e. clear() ) which wipes out the entire StringBuilder object without passing any parameters when necessary.
JUSTIFICATION :
Increase code readability and coding efficiency.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
simple clear method which will do internally the same as delete method without passing any parameters.
StringBuilder has delete method which requires the start and end positions as parameters. However, there is no easy/simple method for clearing the entire StringBuilder object. It will be nice if there is a method (i.e. clear() ) which wipes out the entire StringBuilder object without passing any parameters when necessary.
JUSTIFICATION :
Increase code readability and coding efficiency.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
simple clear method which will do internally the same as delete method without passing any parameters.
- duplicates
-
JDK-4866323 (str) String{Buffer,Builder} should have clear()
-
- Closed
-