name: duk_compile_string_filename proto: | void duk_compile_string_filename(duk_context *ctx, duk_uint_t flags, const char *src); stack: | [ ... filename! ] -> [ ... function! ] summary: |

Like duk_compile(), but the compile input is given as a C string.

example: | duk_push_string(ctx, "myFile.js"); duk_compile_string_filename(ctx, 0, "print('program code');"); tags: - compile - string introduced: 1.0.0