src/main/java/me/zzp/util/Seq.java
public static String join(Collection<?> list, String delimiter) {
    if (list == null || list.isEmpty()) {
      return "";
    }
    if (delimiter == null) {
      delimiter = "";
    }

    StringBuilder s = new StringBuilder();
    boolean first = true;
    for (Object e : list) {
      if (first) {
        first = false;
      } else {
        s.append(delimiter);
      }
      s.append(e);
    }
    return s.toString();
  }
public static String join(Collection<?> list, String delimiter) {
    if (list == null || list.isEmpty()) {
      return "";
    }
    if (delimiter == null) {
      delimiter = "";
    }

    StringBuilder s = new StringBuilder();
    boolean first = true;
    for (Object e : list) {
      if (first) {
        first = false;
      } else {
        s.append(delimiter);
      }
      s.append(e);
    }
    return s.toString();
  }
将容器里的元素连接成字符串。

@param list 包含任意多个元素的容器。
@param delimiter 分隔符。
@return 连接后的字符串。