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 .