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

Method join

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

Source from the content-addressed store, hash-verified

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