Join the <tt>String</tt> representations of a collection of objects, with the specified
separator.

@param col the col
@param sep the sep
@return  newly created .
490804
public static String join( Collection col, char sep )
	{
		if( col.isEmpty() )
		{
			return "";
		}
		StringBuffer buffer = new StringBuffer();
		boolean first = true; 
		for (Object o : col)
		{
			if( first )
			{
				first = false;
			}
			else
			{
				buffer.append( sep );
			}
			buffer.append( o.toString() );
		}
		return buffer.toString();
	}
343141
public static String join(final Object collection, final String separator) {

        Collection<?> convertedCollection = (Collection<?>) collection;
        return join(convertedCollection, separator);
    }
819160
public static String groupConcat(String column, String separator) {
		return groupConcat(column, separator, aliased(column));
	}
699232
public static String join(final Object[] array, final String separator) {

    if (isEmpty(array)) {
      return "";
    }
    StringBuffer stringBuffer = new StringBuffer();
    boolean isFirstVisited = true;
    for (Object object : array) {
      if (isFirstVisited) {
        isFirstVisited = false;
      } else {
        stringBuffer.append(separator);
      }
      stringBuffer.append(ObjectUtils.toString(object));
    }
    return stringBuffer.toString();
  }
1115447
private static String join(double[] seriesData, String separator) {

    // two or more elements
    StringBuilder sb = new StringBuilder(256); // Java default is 16, probably too small
    sb.append(seriesData[0]);
    for (int i = 1; i < seriesData.length; i++) {

      if (separator != null) {
        sb.append(separator);
      }

      sb.append(seriesData[i]);
    }
    return sb.toString();
  }
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();
    }
580860
public static String join(String delim, Iterable<?> objects) {
    return join(new StringBuilder(), delim, objects).toString();
  }
285387
public static String join(String separator, Object... values) {
		return join(Arrays.asList(values), separator);
	}
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();
    }
174536
public static String join(final String delimiter, final Collection<?> elements)
	{
		if (elements == null || elements.isEmpty())
		{
			return "";
		}
		return join(delimiter, elements.toArray(new Object[elements.size()]));
	}
1062157
public static String join(List<String> list, String separator) {
        if (list == null) {
            return null;
        }

        return join(list.toArray(), separator, 0, list.size());
    }
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();
    }
953228
public static String join(Collection<String> s, String delimiter) {
        return join(s, delimiter, false);
    }
1076669
private static <T> StringBuilder appendAllTo(final StringBuilder buf, final String sep, final T... types) {
        Assert.requireNonNullEntries(types, "types");
        Assert.requireNotEmpty(types, "types");
        if (types.length > 0) {
            buf.append(toString(types[0]));
            for (int i = 1; i < types.length; i++) {
                buf.append(sep).append(toString(types[i]));
            }
        }
        return buf;
    }
374475
public static String format(String[] d, String sep) {
    if(d == null) {
      return "null";
    }
    if(d.length == 0) {
      return "";
    }
    if(d.length == 1) {
      return d[0];
    }
    int len = sep.length() * (d.length - 1);
    for(String s : d) {
      len += s.length();
    }
    StringBuilder buffer = new StringBuilder(len)//
        .append(d[0]);
    for(int i = 1; i < d.length; i++) {
      buffer.append(sep).append(d[i]);
    }
    return buffer.toString();
  }
421350
public static String joinBySeparator( List<String> items, String separator ) {
        int size = items.size();
        if (size == 0) {
            return "";
        }
        StringBuilder sb = new StringBuilder(items.get(0));
        for( int i = 1; i < size; i++ ) {
            sb.append(separator).append(items.get(i));
        }
        return sb.toString();
    }
1055414
public static String join(SoyList list, String separator) {
    List<String> stringList = new ArrayList<>();
    for (SoyValue value : list.asResolvedJavaList()) {
      stringList.add(value.coerceToString());
    }
    return Joiner.on(separator).join(stringList);
  }