public static String join ( String [ ] input , char separator ) { //simple case, no escaping StringBuilder stringBuilder = new StringBuilder ( ) ; for ( String s : input ) { if ( stringBuilder . length ( ) > 0 ) { stringBuilder . append ( separator ) ; } stringBuilder . append ( s ) ; } return stringBuilder . toString ( ) ; }
Join an array of strings with the given separator without escaping