public StrBuilder minimizeCapacity(){
  if (buffer.length > length()) {
    final char[] old=buffer;
    buffer=new char[length()];
    System.arraycopy(old,0,buffer,0,size);
  }
  return this;
}

public StrBuilder minimizeCapacity ( ) { if ( buffer . length > length ( ) ) { final char [ ] old = buffer ; buffer = new char [ length ( ) ] ; System . arraycopy ( old , 0 , buffer , 0 , size ) ; } return this ; }
minimizes the capacity to the actual length of the string .
