Join a list of strings by string.

@param items the list of strings.
@param separator the separator to use.
@return the resulting string.
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();
    }
791596
public static void join(StringBuilder buf, Iterable<?> values, String separator) {
		for (Iterator<?> i = values.iterator(); i.hasNext();) {
			buf.append(i.next());
			if (i.hasNext()) {
				buf.append(separator);
			}
		}
	}
190574
public static String join(Collection<?> collection, String separator)
  {
    return StringUtils.join(collection, separator);
  }
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());
    }
1097391
public static StringBinding join(final ObservableList<?> items, final ObservableValue<String> delimiter) {
        return Bindings.createStringBinding(() -> items.stream().map(String::valueOf).collect(Collectors.joining(delimiter.getValue())), items, delimiter);
    }
1195739
public String join(String separator) throws JSONException {
		int len = this.rawList.size();
		StringBuilder sb = new StringBuilder();

		for (int i = 0; i < len; i += 1) {
			if (i > 0) {
				sb.append(separator);
			}
			sb.append(InternalJSONUtil.valueToString(this.rawList.get(i)));
		}
		return sb.toString();
	}
660976
function join(separator, itemList) {
    var result = "";
    for (var i = 0; i < itemList.length; i++) {
        if (i > 0) {
            result += separator;
        }
        result += itemList[i];
    }
    return result;
}
77786
public static List<String> splitNicely( String toSplit, String separator ) {

		if( separator == null || separator.isEmpty())
			throw new IllegalArgumentException( "The separator cannot be null or the empty string." );

		return splitNicelyWithPattern( toSplit, Pattern.quote( separator ));
	}
598033
public static String join(final Collection<?> col, final String separator) {
        return join(col, separator, ELEMENT_CONVERTER);
    }
1339405
public static String join(String separator, String[] parts) {
        StringBuilder builder = new StringBuilder();
        boolean first = true;
        for (String part : parts) {
            if (first) {
                first = false;
            } else {
                builder.append(separator);
            }
            builder.append(part);
        }
        return builder.toString();
    }
277965
public static String joinByComma( List<String> items ) {
        StringBuilder sb = new StringBuilder();
        for( String item : items ) {
            sb.append(",").append(item);
        }
        if (sb.length() == 0) {
            return "";
        }
        return sb.substring(1);
    }
832431
public static String join(Collection collection, String separator) {
        if (isEmpty(collection)) {
            return StringUtils.EMPTY;
        }
        StringBuilder sb = new StringBuilder();
        for (Object object : collection) {
            if (object != null) {
                String string = StringUtils.toString(object);
                if (string != null) {
                    sb.append(string).append(separator);
                }
            }
        }
        return sb.length() > 0 ? sb.substring(0, sb.length() - separator.length()) : StringUtils.EMPTY;
    }
378794
@Nonnull
    public static String join(@Nonnull Iterable<String> elements, @Nonnull String delimiter) {
        StringBuilder result = new StringBuilder();
        Iterator<String> it = elements.iterator();
        while (it.hasNext()) {
            String element = it.next();
            result.append(element);
            if (it.hasNext()) {
                result.append(delimiter);
            }
        }
        return result.toString();
    }
638366
public static String join(Object array, char separator, Object... pieces) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0, ii = Array.getLength(array); i < ii; ++i) {
            Object element = Array.get(array, i);
            sb.append(element != null ? element.toString() : "null").append(separator);
        }
        for (int i = 0; i < pieces.length; ++i) {
            sb.append(pieces[i] != null ? pieces[i].toString() : "null").append(separator);
        }
        if (sb.length() > 0) sb.setLength(sb.length()-1);
        return sb.toString();
    }
418140
def composite_join(separator, items):
        
        output = Composite()
        first_item = True
        for item in items:
            # skip empty items
            if not item:
                continue
            # skip separator on first item
            if first_item:
                first_item = False
            else:
                output.append(separator)
            output.append(item)
        return output
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;
    }
343141
public static String join(final Object collection, final String separator) {

        Collection<?> convertedCollection = (Collection<?>) collection;
        return join(convertedCollection, separator);
    }