public static void join ( StringBuilder sb , Object [ ] array , String delimiter ) { if ( empty ( array ) ) { return ; } sb . append ( array [ 0 ] ) ; for ( int i = 1 ; i < array . length ; i ++ ) { sb . append ( delimiter ) ; sb . append ( array [ i ] ) ; } }
Joins the items in array with a delimiter and appends the result to StringBuilder .