MCPcopy Create free account
hub / github.com/dynjs/dynjs / format

Method format

src/main/java/org/dynjs/runtime/modules/UtilModule.java:15–28  ·  view source on GitHub ↗
(Object... args)

Source from the content-addressed store, hash-verified

13public class UtilModule {
14
15 @Export
16 public String format(Object... args) {
17 if (args[0] instanceof String) {
18 String format = (String) args[0];
19 return String.format(format, Arrays.copyOfRange(args, 1, args.length));
20 }
21 else {
22 String concat = "";
23 for(Object arg: args) {
24 concat += arg.toString() + " ";
25 }
26 return concat.trim();
27 }
28 }
29
30 @Export
31 public void debug(String message) {

Callers 6

jasmine.jsFile · 0.45
formatParityMethod · 0.45
formatWithExtraArgsMethod · 0.45
DynJSClass · 0.45

Calls 1

toStringMethod · 0.45

Tested by 4

formatParityMethod · 0.36
formatWithExtraArgsMethod · 0.36