private static String trim ( StringBuilder builder ) { String str = builder . toString ( ) . trim ( ) ; builder . setLength ( 0 ) ; return str ; }
Get a trim string from the builder and clear the builder .