delete(int start, int end)

StringBuilder delete(int start, int end)
Removes the characters in a substring of this sequence.

public class Main {
  public static void main(String[] args) {
    StringBuilder lipsum = new StringBuilder("Lorem ipsum dolor sit amet.");
    System.out.println("lipsum = " + lipsum.toString());

    lipsum.delete(0, 28);
    System.out.println("lipsum = " + lipsum.toString());

    lipsum.deleteCharAt(lipsum.length() - 1);
    System.out.println("lipsum = " + lipsum.toString());
  }
}
Home 
  Java Book 
    Essential Classes  

StringBuilder:
  1. StringBuilder
  2. StringBuilder Constructor
  3. append(char c)
  4. StringBuilder capacity()
  5. charAt()
  6. delete(int start, int end)
  7. deleteCharAt
  8. StringBuilder length()
  9. StringBuilder reverse()
  10. setCharAt
  11. Sub string from StringBuilder
  12. toString():Convert StringBuilder to String