=proto void duk_join(duk_context *ctx, duk_idx_t count); =stack [ ... sep! val1! ...! valN! ] -> [ ... result! ] =summary
Join zero or more values into a result string with a separator between each value. The separator and the input values are automatically coerced with ToString().
This primitive minimizes the number of intermediate string interning operations and is better than joining strings manually.
=example duk_push_string(ctx, "; "); duk_push_string(ctx, "foo"); duk_push_int(ctx, 123); duk_push_true(ctx); duk_join(ctx, 3); printf("result: %s\n", duk_get_string(ctx, -1)); /* "foo; 123; true" */ duk_pop(ctx); =tags string =seealso duk_concat =introduced 1.0.0