public static String implode(String[] array, String sepString) {
        if (array==null) return null;
        StringBuilder ret = new StringBuilder();
        if (sepString==null) sepString="";
        for (int i = 0 ; i<array.length ; i++) {
            ret.append(array[i]);
            if (!(i==array.length-1)) ret.append(sepString);
        }
        return ret.toString();
    }
Returns the given array flattened to string, with the given separator string
@param array the array
@param sepString or null
@return imploded array
vespajlib/src/main/java/com/yahoo/text/StringUtilities.java