public static String join ( String separator , Collection < String > values ) { StringBuilder builder = new StringBuilder ( ) ; boolean first = true ; for ( String value : values ) { if ( ! first ) { builder . append ( separator ) ; } builder . append ( value ) ; first = false ; } return builder . toString ( ) ; }
Join all strings to a single one using given separator .