Joins a collection of string with a given delimiter.

@param strings The collection of strings to join.
@param delimiter The delimiter to use to join them.
@return The string built by joining the string with the delimiter.
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();
    }
571782
public static String join(List<String> parts, String separator) {
		Iterator<String> it = parts.iterator();
		StringBuilder builder = new StringBuilder();
		while (it.hasNext()) {
			String part = it.next();
			builder.append(part);
			if (it.hasNext()) {
				builder.append(separator);
			}
		}
		return builder.toString();
	}
31836
@NotNull
    public static Collector<CharSequence, ?, String> joining(
            @NotNull CharSequence delimiter,
            @NotNull CharSequence prefix,
            @NotNull CharSequence suffix) {
        return joining(delimiter, prefix, suffix, prefix.toString() + suffix.toString());
    }
416299
public static <T> void join(Collection<T> collection, String delimiter, StringBuilder sb) {
		join(collection, delimiter, sb, new JoinCallback<T>() {
			public void handle(StringBuilder sb, T value) {
				sb.append(value);
			}
		});
	}
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();
    }
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());
    }
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();
    }
970115
public static String join(Collection<String> s, String delimiter, boolean doQuote) {
        StringBuffer buffer = new StringBuffer();
        Iterator<String> iter = s.iterator();
        while (iter.hasNext()) {
            if (doQuote) {
                buffer.append("\"" + iter.next() + "\"");
            } else {
                buffer.append(iter.next());
            }
            if (iter.hasNext()) {
                buffer.append(delimiter);
            }
        }
        return buffer.toString();
    }
228991
public static String join(Collection collection, String separator) {
        return join(collection, separator, true);
    }
1367547
public static String join(Object[] objects, String separator) {
        String result;

        if (objects.length > 0) {
            result = objects[0].toString();
            for (int i = 1; i < objects.length; i++) {
                result += separator + objects[i].toString();
            }
        } else {
            result = "";
        }

        return result;
    }
367829
public static String join(final Collection<String> seq, final String delimiter) {
    if (null == seq || seq.size() < 1) {
      return "";
    } else {
      StringBuilder aim = new StringBuilder();
      for (String one : seq) {
        if (null != delimiter && aim.length() > 0) {
          aim.append(delimiter);
        }
        aim.append(one);
      }
      return aim.toString();
    }
  }
735361
public static StringBuilder join(StringBuilder builder, String delim, Object... objects) {
    return join(builder, delim, Arrays.asList(objects));
  }
609947
public static String joiningWith(Stream<String> stringStream,
            CharSequence delimiter) {
        return stringStream.collect(Collectors.joining(delimiter));
    }
285387
public static String join(String separator, Object... values) {
		return join(Arrays.asList(values), separator);
	}
65228
@SuppressWarnings({"rawtypes", "unchecked"})
    public static String join(final Collection<?> collection, final String delimiter, final TextPrinter printer) {
        
        Objects.requireNonNull(printer);
        
        if(collection == null || collection.isEmpty()) {
            return "";
        }
        
        String value = collection.stream()
                .map(v -> printer.print(v))
                .collect(Collectors.joining(defaultString(delimiter)));
        
        return value;
    }
76309
public static String connectByDelimiter(Collection<String> strList, String delimiter) {
        assertStringListNotNull(strList);
        return doConnectByDelimiter(strList, delimiter, null);
    }
1121604
public static String join(final String sep, final String... strs) {
        return join(sep, Arrays.asList(strs));
    }