Intersperse the element between the elements of the array
@param sep The element to be interspersed
494637
function intersperse(sep, xs) {
    return concat(xs.map(x => [sep, x])).slice(1);
}
598033
public static String join(final Collection<?> col, final String separator) {
        return join(col, separator, ELEMENT_CONVERTER);
    }
1088729
public String[] getStringArrayBySeparator(String key, String separator) {
    String value = getString(key);
    if (value != null) {
      String[] strings = StringUtils.splitByWholeSeparator(value, separator);
      String[] result = new String[strings.length];
      for (int index = 0; index < strings.length; index++) {
        result[index] = trim(strings[index]);
      }
      return result;
    }
    return ArrayUtils.EMPTY_STRING_ARRAY;
  }
482492
function(_data,_sep){
        if (!_data) return null;
        var _arr = [],
            _and = _sep=='&';
        _u._$forIn(
            _data,function(v,k){
                _arr.push(
                    !_and ? (k+'='+v) :
                    (encodeURIComponent(k)+'='+encodeURIComponent(v))
                );
            }
        );
        return _arr.join(_sep||'\n');
    }
1250668
def sepBy(p, sep):
    ''''''
    return separated(p, sep, 0, maxt=float('inf'), end=False)
76335
public static String join(char sep, Iterable itr) {
        return join(String.valueOf(sep), itr);
    }
331050
def separated(self, separator='-'):
        """"""
        return separator.join((part for part in self.elements() if part))
334998
public static String join(final Iterable<?> elements, final char separator) {
        return Joiner.on(separator).skipNulls().join(elements);
    }
832617
public static String flatten(List lines, String sep) {
    return flatten(lines.toArray(new Object[lines.size()]), sep);
  }
254204
public static String join(String separator, Collection<String> stringsToJoin) {
        StringBuilder builder = new StringBuilder();
        // Check if there is at least 1 element then use do/while to avoid trailing separator
        int index = stringsToJoin.size();
        for (String str : stringsToJoin) {
            index--;
            if (str != null) {
                builder.append(str);
                if (index > 0) {
                    builder.append(separator);
                }
            }
        }
        return builder.toString();
    }
1170623
public static String format(boolean[] b, final String sep) {
    return (b == null) ? "null" : (b.length == 0) ? "" : //
        formatTo(new StringBuilder(), b, ", ").toString();
  }
220382
public static String join(final String sep, final Object... items) {
        final StringBuilder buf = new StringBuilder();
        boolean first = true;
        for (final Object item : items) {
            if (first) {
                first = false;
            } else {
                buf.append(sep);
            }
            buf.append(item.toString());
        }
        return buf.toString();
    }
1356476
public static String join(final Object array, final String separator) {
		$.checkNotEmpty(array);
		Class<?> arrayType = array.getClass();
		Preconditions.checkArgument(arrayType.isArray(), "parameter array must be Array: %s", array);

		StringBuffer sb = new StringBuffer();
		sb.append(Array.get(array, 0));

		int length = Array.getLength(array);
		for (int i = 1; i < length; i++) {
			sb.append(separator).append(Array.get(array, i));
		}

		return sb.toString();
	}
1347510
public static String join(int[] array, String separator) {
        if (array != null) {
            StringBuilder buf = new StringBuilder(Math.max(16, (separator.length() + 1) * array.length));
            char singleChar = separator.length() == 1 ? separator.charAt(0) : 0;
            for (int i = 0; i < array.length; i++) {
                if (i != 0) {
                    if (singleChar != 0) {
                        // More efficient
                        buf.append(singleChar);
                    } else {
                        buf.append(separator);
                    }
                }
                buf.append(array[i]);
            }
            return buf.toString();
        } else {
            return "";
        }
    }
423315
public List<byte[]> split(byte sep) {
        List<byte[]> l = new LinkedList<>();
        int start = 0;
        for (int i = 0; i < bytes.length; i++) {
            if (sep == bytes[i]) {
                byte[] b = Arrays.copyOfRange(bytes, start, i);
                if (b.length > 0) {
                    l.add(b);
                }
                start = i + 1;
                i = start;
            }
        }
        l.add(Arrays.copyOfRange(bytes, start, bytes.length));
        return l;
    }
571755
@Override
    public ListT<W,T> intersperse(final T value) {

        return (ListT<W,T>) FoldableTransformerSeq.super.intersperse(value);
    }
348445
def endBy(p, sep):
    ''''''
    return separated(p, sep, 0, maxt=float('inf'), end=True)