src/main/java/pw/phylame/util/StringUtils.java
/**
     * Joins string array to string.
     * @param <T> the class of the objects in the array
     * @param seq array of object or string
     * @param separator separator between string and string
     * @return joined string
     */
Joins string array to string.
@param  the class of the objects in the array
@param seq array of object or string
@param separator separator between string and string
@return joined string
Joins string array to string . @param the class of the objects in the array @param seq array of object or string @param separator separator between string and string @return joined string
public static <T> String join(T[] seq, String separator) {
        int iMax = seq.length - 1;
        if (iMax == -1) {
            return "";
        }
        StringBuilder b = new StringBuilder();
        for (int i = 0; ; i++) {
            b.append(seq[i]);
            if (i == iMax) {
                return b.toString();
            }
            b.append(separator);
        }
    }
public static < T > String join ( T [ ] seq , String separator ) { int iMax = seq . length - 1 ; if ( iMax == - 1 ) { return "" ; } StringBuilder b = new StringBuilder ( ) ; for ( int i = 0 ; ; i ++ ) { b . append ( seq [ i ] ) ; if ( i == iMax ) { return b . toString ( ) ; } b . append ( separator ) ; } }
Joins string array to string.
Joins string array to string .