Join an array of strings into one delimited string.

@param array Array of objects to join as strings.
@param delim Delimiter to join strings with or <i>null</i>.
@return Joined string.
763804
public static String join(final Object array[], final String delim)
   {
      return join(new StringBuffer(), array, delim);
   }
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();
  }
466483
protected String join(Collection<?> list, String delimiter) {
        return Joiner.on(delimiter).join(list);
    }
74193
public static String join ( CharSequence delimiter, CharSequence... elements ) {
        StringBuilder sb = new StringBuilder();
        for ( CharSequence element : elements ) {
            if ( sb.length() > 0 ) {
                if ( delimiter != null ) {
                    sb.append(delimiter);
                }
                else {
                    sb.append("null");
                }
            }
            sb.append(element);
        }
        return sb.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;
  }
931475
public static String join(final List<String> strings, final char delimiter) {
        StringBuilder builder = new StringBuilder();
        for (String element : strings) {
            if (builder.length() != 0) {
                builder.append(delimiter);
            }
            builder.append(element);
        }
        return builder.toString();
    }
829136
public static String join(final String[] seq, final String delimiter) {
    if (null == seq || seq.length < 1) return "";
    Assert.notNull(delimiter);
    StringBuilder aim = new StringBuilder();
    for (int i = 0; i < seq.length; i++) {
      if (aim.length() > 0) aim.append(delimiter);
      aim.append(seq[i]);
    }
    return aim.toString();
  }
162877
private String stringArray2String(String[] array) {
        StringBuilder sb = new StringBuilder("");
        for (int i = 0 ; i<array.length ; i++) {
            sb.append(array[i]);
            if (i<array.length - 1)
                sb.append("\n");
        }
        return sb.toString();
    }
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();
    }
418905
public static String join(final Collection<String> chunks,
    final String delimiter) {
    StringBuilder sb = new StringBuilder();
    if (!chunks.isEmpty()) {
      Iterator<String> itr = chunks.iterator();
      sb.append(itr.next());
      while (itr.hasNext()) {
        sb.append(delimiter);
        sb.append(itr.next());
      }
    }
    return sb.toString();
  }
251695
public static String join(final Collection<?> collection, final String delimiter) {
        
        if(collection == null || collection.isEmpty()) {
            return "";
        }
        
        String value = collection.stream()
                .map(v -> v.toString())
                .collect(Collectors.joining(defaultString(delimiter)));
        
        return value;
    }
1100931
public static StringBuilder join(StringBuilder builder, String delim, Iterable<?> objects) {
    int i = 0;
    for (Object obj : objects) {
      if (i++ > 0) builder.append(delim);
      builder.append(obj);
    }
    return builder;
  }
17146
public Csv arrayElementDelimiter(String delimiter) {
		Preconditions.checkNotNull(delimiter);
		internalProperties.putString(FORMAT_ARRAY_ELEMENT_DELIMITER, delimiter);
		return this;
	}
1327913
public static String join(String[] array) {
    return array == null ? null : join(asList(array));
  }
452464
public static String arrayToList(String[] array, String delimiter) {
	if (ArrayUtil.isEmpty(array)) return "";
	StringBuilder sb = new StringBuilder(array[0]);

	if (delimiter.length() == 1) {
	    char c = delimiter.charAt(0);
	    for (int i = 1; i < array.length; i++) {
		sb.append(c);
		sb.append(array[i]);
	    }
	}
	else {
	    for (int i = 1; i < array.length; i++) {
		sb.append(delimiter);
		sb.append(array[i]);
	    }
	}

	return sb.toString();
    }
1371034
public static String join(String[] strings) {
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < strings.length; i++) {
            builder.append(strings[i]);
            if (i + 1 < strings.length) builder.append(",");
        }
        return builder.toString();
    }
1306185
public static String arrayToDelimitedString(Object[] arr, String delim) {
        if (Objects.isEmpty(arr)) {
            return "";
        }
        if (arr.length == 1) {
            return Objects.nullSafeToString(arr[0]);
        }
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < arr.length; i++) {
            if (i > 0) {
                sb.append(delim);
            }
            sb.append(arr[i]);
        }
        return sb.toString();
    }