public static String addObjects ( Object ... objects ) { int length = 0 ; for ( Object obj : objects ) { if ( obj == null ) { continue ; } length += obj . toString ( ) . length ( ) ; } CharBuf builder = CharBuf . createExact ( length ) ; for ( Object str : objects ) { if ( str == null ) { continue ; } builder . add ( str . toString ( ) ) ; } return builder . toString ( ) ; }
Add many objects converted to strings together . Null are ignored so be careful .