question: public String trimToSize ( String str , int maxStringLength ) { if ( str == null ) return null ; if ( str . length ( ) > maxStringLength ) { StringBuilder sb = new StringBuilder ( str ) ; sb . setLength ( maxStringLength ) ; str = sb . toString ( ) ; } return str ; }
target:  Trim a given string to maxStringLength if it is over maxStringLength.