docs: public static String format(Collection<String> d, String sep) {
      if(d == null) {
        return "null";
      }
      if(d.isEmpty()) {
        return "";
      }
      if(d.size() == 1) {
        return d.iterator().next();
      }
      int len = sep.length() * (d.size() - 1);
      for(String s : d) {
        len += s.length();
      }
      Iterator<String> it = d.iterator();
      StringBuilder buffer = new StringBuilder(len) //
          .append(it.next());
      while(it.hasNext()) {
        buffer.append(sep).append(it.next());
      }
      return buffer.toString();
    }