MCPcopy Create free account
hub / github.com/mozilla/rhino / join

Method join

rhino/src/main/java/org/mozilla/javascript/NativeJSON.java:359–370  ·  view source on GitHub ↗
(Collection<Object> objs, String delimiter)

Source from the content-addressed store, hash-verified

357 }
358
359 private static String join(Collection<Object> objs, String delimiter) {
360 if (objs == null || objs.isEmpty()) {
361 return "";
362 }
363 Iterator<Object> iter = objs.iterator();
364 if (!iter.hasNext()) return "";
365 StringBuilder builder = new StringBuilder(iter.next().toString());
366 while (iter.hasNext()) {
367 builder.append(delimiter).append(iter.next());
368 }
369 return builder.toString();
370 }
371
372 private static String jo(Scriptable value, StringifyState state) {
373 Object trackValue = value, unwrapped = null;

Callers 15

joMethod · 0.95
jaMethod · 0.95
PrettyPrintFunction · 0.45
toHexFunction · 0.45
runTestScriptMethod · 0.45
runScriptsMethod · 0.45
test.jsFile · 0.45
closeMethod · 0.45

Calls 6

isEmptyMethod · 0.65
toStringMethod · 0.65
appendMethod · 0.65
iteratorMethod · 0.45
hasNextMethod · 0.45
nextMethod · 0.45