java tutorial - Java StringBuffer delete() method - java programming - learn java - java basics - java for beginners
Learn Java - Java tutorial - Java stringbuffer delete - Java examples - Java programs
Description
- The delete () method — deletes characters in the substring of this buffer string ( StringBuffer ). The substring starts at the specified start index and extends to the end-index character, or to the end of the StringBuffer , if such a character does not exist.
- In other words, the method allows you to delete characters from a string, starting and ending with the specified indexes.
If start (initial index) is equal to end (end index), then no changes are made.
Syntax
Syntax method:
Options
Detailed information about the parameters:
- start - initial index, inclusive;
- end - end index, not including.
Return value
- In Java, delete () returns a buffer string object ( StringBuffer ).