Same as {@link #join(String, Object...)} but with a {@link Collection} instead of an Array for the
elements.

@see #join(String, java.util.Collection)
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()]));
	}
774322
public static String join(final String delimiter, final Object... elements)
	{
		final StringBuilder sb = new StringBuilder();
		for (final Object part : elements)
		{
			if (part == null)
			{
				continue;
			}
			if (sb.length() > 0)
			{
				sb.append(delimiter);
			}
			sb.append(part.toString());
		}
		return sb.toString();
	}
1279882
public static final String join(CharSequence delimiter, CharSequence... strs)
	{
		return StringUtils.join(strs, delimiter.toString());
	}
181588
private String stringJoin(String[] array, int count){
    String joined = "";
    for(int i = 0; i < count; i++)
      joined += array[i];
    return joined;
  }
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();
    }
242805
@Nonnull
  @MayContainNull
  @Weight(Weight.Unit.NORMAL)
  public static <T> T[] joinArrays(@MayContainNull final T[]... arrays) {
    int commonLength = 0;
    for (final T[] array : arrays) {
      if (array != null) {
        commonLength += array.length;
      }
    }
    @SuppressWarnings("unchecked")
    final T[] result = (T[]) Array.newInstance(arrays.getClass().getComponentType().getComponentType(), commonLength);
    int position = 0;
    for (final T[] array : arrays) {
      if (array != null) {
        System.arraycopy(array, 0, result, position, array.length);
        position += array.length;
      }
    }
    return result;
  }
661279
public static String join(final Object[] arrays, final String separator) {

        return join(arrays, separator, ELEMENT_CONVERTER);

    }
77728
public static <T> String join(T[] array) {
        return new JoinStrings<T>().apply(new ArrayIterator<T>(array));
    }
573877
@SuppressWarnings({"rawtypes", "unchecked"})
    public static String join(final Object[] arrays, final String separator, final ElementConverter elementConverter) {

        if(arrays == null) {
            return "";
        }

        final int len = arrays.length;
        if(len == 0) {
            return "";
        }

        StringBuilder sb = new StringBuilder();
        for(int i=0; i < len; i++) {
            final Object element = arrays[i];
            sb.append(elementConverter.convertToString(element));

            if(separator != null && (i < len-1)) {
                sb.append(separator);
            }
        }

        return sb.toString();

    }
1202654
public static String join(final Object[] array, final String delimiter) {
        
        if(array == null || array.length == 0) {
            return "";
        }
        
        String value = Arrays.stream(array)
                .map(v -> v.toString())
                .collect(Collectors.joining(defaultString(delimiter)));
        
        return value;
    }
1091852
public String joinEx(Object collection, String delim, String prefix, String suffix) {
		if (collection == null) {
			return StringUtils.collectionToDelimitedString(Collections.emptyList(), delim, prefix, suffix);
		} else if (collection instanceof Collection) {
			return StringUtils.collectionToDelimitedString((Collection<?>) collection, delim, prefix, suffix);
		} else if (collection.getClass().isArray()) {
			return StringUtils.collectionToDelimitedString(CollectionUtils.arrayToList(collection), delim, prefix, suffix);
		} else {
			return StringUtils.collectionToDelimitedString(Collections.singletonList(collection), delim, prefix, suffix);
		}
	}
986020
private static String joinString(String[] array) {
    StringBuilder sb = new StringBuilder();
    for (String value : array) {
      if (sb.length() > 0) {
        sb.append(" ");
      }
      sb.append(value);
    }
    return sb.toString();
  }
763804
public static String join(final Object array[], final String delim)
   {
      return join(new StringBuffer(), array, delim);
   }
937236
static String toStringImpl(final Collection<?> collection) {
    StringBuilder sb = newStringBuilderForCollection(collection.size()).append('[');
    STANDARD_JOINER.appendTo(
        sb,
        Iterables.transform(
            collection,
            new Function<Object, Object>() {
              @Override
              public Object apply(Object input) {
                return input == collection ? "(this Collection)" : input;
              }
            }));
    return sb.append(']').toString();
  }
705767
public static String join(Collection<? extends Object> lst, String separator) {
        StringBuilder buf = new StringBuilder(lst.size() * 64);
        boolean first = true;
        for (Object value : lst) {
            if (first) first = false; else buf.append(separator);
            buf.append(value.toString());
        }
        return buf.toString();
    }
408135
public static String join(String _delimiter, String[] _strings) {
        return join(_delimiter, Arrays.asList(_strings));
    }
473805
public static String join(final Collection<String> list, final String separator) {
        final StringBuilder sb = new StringBuilder();
        for (final String s : list) {
            if (sb.length() > 0) {
                sb.append(separator);
            }
            sb.append(s);
        }
        return sb.toString();
    }