Joins multiple {@link CodeBlock}s together with a given delimiter
541562
@SuppressWarnings("SameParameterValue")
  static CodeBlock join(Iterable<CodeBlock> codeBlocks, String delimiter) {
    CodeBlock.Builder builder = CodeBlock.builder();
    Iterator<CodeBlock> iterator = codeBlocks.iterator();
    while (iterator.hasNext()) {
      builder.add(iterator.next());
      if (iterator.hasNext()) {
        builder.add(delimiter);
      }
    }
    return builder.build();
  }
252653
public M joinsWith(String separator, Object... join) {
		this.delegate = Optional.of(joinWith(separator, join));
		return THIS();
	}
448196
public String join(String separator, final String keyValueSeparator) {
		return MapUtil.join(this.map, separator, keyValueSeparator);
	}
1175579
public static String join(String[] strings, String separator) {
      StringBuilder sb = new StringBuilder();
      boolean first = true;
      for (String s : strings) {
         if (first) {
            first = false;
         } else {
            sb.append(separator);
         }
         sb.append(s);
      }
      return sb.toString();
   }
151525
public String joinWith(String separator, Object... join) {
		return Joiner.on(separator).join(delegate.get(), EMPTY, join);
	}
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();
  }
424366
private static String join(String sep, Collection<String> collection) {
    StringBuilder builder = new StringBuilder();
    boolean first = true;
    for (String element : collection) {
      if (first) {
        first = false;
      } else {
        builder.append(sep);
      }
      builder.append(element);
    }
    return builder.toString();
  }
103687
private static String join(Collection<?> args, String delim) {
        StringBuilder buf = new StringBuilder();
        for (Object arg : args) {
            if (buf.length()>0) buf.append(delim);
            buf.append(arg);
        }
        return buf.toString();
    }
653831
public static String join(String delimiter, Iterable<String> strings) {
    StringBuilder sb = new StringBuilder();
    for (String item : strings) {
      if (sb.length() > 0) sb.append(delimiter);
      sb.append(item);
    }
    return sb.toString();
  }
1158307
public static CharSequence join(CharSequence delimiter, Iterable<? extends CharSequence> list) {
    Iterator<? extends CharSequence> it = list.iterator();
    if (it.hasNext()) {
      StringBuilder sb = new StringBuilder(it.next());
      while (it.hasNext()) {
        sb.append(delimiter);
        sb.append(it.next());
      }
      return sb.toString();
    }
    return "";
  }
328519
@SuppressWarnings("rawtypes")
    public static String join(final Collection coll, final String delim) {
        final StringBuilder buff = new StringBuilder(256);
        Iterator iter;

        if ((coll == null) || coll.isEmpty()) {
            return "";
        }

        iter = coll.iterator();
        while (iter.hasNext()) {
            buff.append(iter.next().toString());

            if (iter.hasNext()) {
                buff.append(delim);
            }
        }

        return buff.toString();
    }
1180326
public static String join(List<String> list, String delim) {

		StringBuilder sb = new StringBuilder();

		String loopDelim = "";

		for (String s : list) {

			sb.append(loopDelim);
			sb.append(s);

			loopDelim = delim;
		}

		return sb.toString();
	}
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;
    }
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();
    }
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;
  }
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();
    }
1229086
public static String join(String delimiter, String... parts) {
    if (parts == null) {
      return null;
    }

    if (delimiter == null) {
      delimiter = "";
    }

    StringBuilder stringBuilder = new StringBuilder();
    for (int i=0; i < parts.length; i++) {
      if (i > 0) {
        stringBuilder.append(delimiter);
      }
      stringBuilder.append(parts[i]);
    }
    return stringBuilder.toString();
  }