public TextEditor indent(int spaces){
  StringBuffer sb=new StringBuffer(spaces);
  for (int i=0; i < spaces; i++) {
    sb.append(' ');
  }
  return replaceAll("^",sb.toString());
}

public TextEditor indent ( int spaces ) { StringBuffer sb = new StringBuffer ( spaces ) ; for ( int i = 0 ; i < spaces ; i ++ ) { sb . append ( ' ' ) ; } return replaceAll ( "^" , sb . toString ( ) ) ; }
introduce a number of spaces at the start of each line .
