public static String concat ( String [ ] values , String delimiter ) { Assert . notNull ( values , "The array of String values to concatenate cannot be null!" ) ; StringBuilder buffer = new StringBuilder ( ) ; for ( String value : values ) { buffer . append ( buffer . length ( ) > 0 ? delimiter : EMPTY_STRING ) ; buffer . append ( value ) ; } return buffer . toString ( ) ; }
Concatenates the array of Strings into a single String value delimited by the specified delimiter .