MCPcopy Create free account
hub / github.com/curtcox/JLHTTP / join

Method join

src/main/java/net/freeutils/httpserver/HTTPServer.java:2558–2563  ·  view source on GitHub ↗

Returns a string constructed by joining the string representations of the iterated objects (in order), with the delimiter inserted between them. @param delim the delimiter that is inserted between the joined strings @param items the items whose string representations are joined @param the item

(String delim, Iterable<T> items)

Source from the content-addressed store, hash-verified

2556 * @return the joined string
2557 */
2558 public static <T> String join(String delim, Iterable<T> items) {
2559 StringBuilder sb = new StringBuilder();
2560 for (Iterator<T> it = items.iterator(); it.hasNext(); )
2561 sb.append(it.next()).append(it.hasNext() ? delim : "");
2562 return sb.toString();
2563 }
2564
2565 /**
2566 * Returns the parent of the given path.

Callers 1

handleMethodMethod · 0.95

Calls 3

iteratorMethod · 0.80
hasNextMethod · 0.80
nextMethod · 0.80

Tested by

no test coverage detected