MCPcopy Index your code
hub / github.com/antlr/codebuff / join

Method join

output/java8/1.4.17/Misc.java:49–58  ·  view source on GitHub ↗
(Iterator<?> iter, String separator)

Source from the content-addressed store, hash-verified

47 // Seriously: why isn't this built in to java?
48
49 public static String join(Iterator<?> iter, String separator) {
50 StringBuilder buf = new StringBuilder();
51 while ( iter.hasNext() ) {
52 buf.append(iter.next());
53 if ( iter.hasNext() ) {
54 buf.append(separator);
55 }
56 }
57 return buf.toString();
58 }
59
60// public static String join(Object[] a, String separator, int start, int stop) {
61// StringBuilder buf = new StringBuilder();

Callers 4

openMethod · 0.95
updateStackMethod · 0.95
showMethod · 0.95
waitForCloseMethod · 0.45

Calls 4

nextMethod · 0.65
toStringMethod · 0.65
hasNextMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected