dap4/d4core/src/main/java/dap4/core/util/DapUtil.java
static public String
    join(String[] array, String sep, int from, int upto)
    {
        if(sep == null) sep = "";
        if(from < 0 || upto > array.length)
            throw new IndexOutOfBoundsException();
        if(upto <= from)
            return "";
        StringBuilder result = new StringBuilder();
        boolean first = true;
        for(int i = from; i < upto; i++, first = false) {
            if(!first) result.append(sep);
            result.append(array[i]);
        }
        return result.toString();
    }
static public String
    join(String[] array, String sep, int from, int upto)
    {
        if(sep == null) sep = "";
        if(from < 0 || upto > array.length)
            throw new IndexOutOfBoundsException();
        if(upto <= from)
            return "";
        StringBuilder result = new StringBuilder();
        boolean first = true;
        for(int i = from; i < upto; i++, first = false) {
            if(!first) result.append(sep);
            result.append(array[i]);
        }
        return result.toString();
    }
Given an Array of Strings and a separator and a count,
concat the first count elements of an array with separator
between them. A null string is treated like "".

@param array the array to concat
@param sep   the separator
@param from  start point for join (inclusive)
@param upto  end point for join (exclusive)
@return the join