Joins the given sequence of strings, which the given separator string between each
consecutive pair.
511423
public static String join (Iterable<?> items, String sep)
    {
        Iterator<?> i = items.iterator();
        if (!i.hasNext()) {
            return "";
        }
        StringBuilder buf = new StringBuilder(String.valueOf(i.next()));
        while (i.hasNext()) {
            buf.append(sep).append(i.next());
        }
        return buf.toString();
    }
25644
@NotNull
    public static Collector<CharSequence, ?, String> joining(@NotNull CharSequence delimiter) {
        return joining(delimiter, "", "");
    }
953228
public static String join(Collection<String> s, String delimiter) {
        return join(s, delimiter, false);
    }
912814
public static String[] split(String s, String separator) {

        HsqlArrayList list      = new HsqlArrayList();
        int           currindex = 0;

        for (boolean more = true; more; ) {
            int nextindex = s.indexOf(separator, currindex);

            if (nextindex == -1) {
                nextindex = s.length();
                more      = false;
            }

            list.add(s.substring(currindex, nextindex));

            currindex = nextindex + separator.length();
        }

        return (String[]) list.toArray(new String[list.size()]);
    }
1198278
public static String join(Collection strings, String sep) {
        return join(strings.iterator(), sep);
    }
209621
public static String join(Iterator strings, String sep) {
        if (!strings.hasNext())
            return "";

        String start = strings.next().toString();
        if (!strings.hasNext()) // only one, avoid builder
            return start;

        StringBuilder sb = StringUtil.borrowBuilder().append(start);
        while (strings.hasNext()) {
            sb.append(sep);
            sb.append(strings.next());
        }
        return StringUtil.releaseBuilder(sb);
    }
371212
public static <T> String join(final Collection<T> collection, final String separator) {

        if (isEmpty(collection)) {
            return "";
        }
        StringBuffer stringBuffer = new StringBuffer();
        boolean isFirstVisited = true;
        for (Object object : collection) {
            if (isFirstVisited) {
                isFirstVisited = false;
            } else {
                stringBuffer.append(separator);
            }
            stringBuffer.append(ObjectUtils.toString(object));
        }
        return stringBuffer.toString();
    }
750281
public static String join(final String sep, final Iterable<String> strs) {
        final StringBuilder buf = new StringBuilder();
        String prefix = "";
        for (final String str : strs) {
            buf.append(prefix).append(str);
            prefix = sep;
        }
        return buf.toString();
    }
285387
public static String join(String separator, Object... values) {
		return join(Arrays.asList(values), separator);
	}
990203
public static String join(String[] collection, String separator,
                              boolean trailing) {
        return join(Arrays.asList(collection), separator, trailing);
    }
715913
public static StringBuilder join(final StringBuilder sb, final String sep, final String... tokens) {
        boolean first = true;
        for (Object t: tokens) {
            if (!first) sb.append(sep);
            else first = false;
            sb.append(t);
        }
        return sb;
    }
435122
public static String join(Collection strings, String delimiter) {
        StringBuilder builder = new StringBuilder();
        Iterator<String> iter = strings.iterator();
        while (iter.hasNext()) {
            builder.append(iter.next());
            if (!iter.hasNext()) {
                break;
            }
            builder.append(delimiter);
        }
        return builder.toString();
    }
498417
public static <T> String join(List<T> list, String separator) {
		StringBuilder builder = new StringBuilder();
		int i = 0;
		for (T t : list) {
			builder.append(t);
			if (++i < list.size()) builder.append(separator);
		}
		return builder.toString();
	}
1057795
public static function join($strings, $separator, $start = 0, $count = -1)
    {
        $string = '';

        $end = $count == -1 ? Collection::count($strings) : $count;

        for ($i = $start; $i < $end; $i++) {
            $string .= $strings[$i].$separator;

            if ($i == ($end - 1)) {
                $string .= $separator;
            }
        }

        return $string;
    }
219177
def joined_seq(seq, sep=None):
    
    """
    joined_seq = tuple(seq)
    if isinstance(sep, basestring):
        joined_seq = sep.join(str(item) for item in joined_seq)
    return joined_seq
897178
public static String join(Iterable<?> iterable, String separator) {
		return Joiner.on(separator).join(iterable);
	}
1205177
public static String join(Collection<String> collection, String separator) {
        if (collection == null) {
            return null;
        }
        return join(collection.toArray(new String[collection.size()]), separator, 0, collection.size());
    }