name: duk_eval_lstring proto: | void duk_eval_lstring(duk_context *ctx, const char *src, duk_size_t len); stack: | [ ... ] -> [ ... result! ] summary: |

Like duk_eval(), but the eval input is given as a C string with explicit length. The filename associated with the temporary eval function is "eval".

example: | const char *src = /* ... */; duk_size_t len = /* ... */; duk_eval_lstring(ctx, src, len); printf("result is: %s\n", duk_get_string(ctx, -1)); duk_pop(ctx); tags: - compile - string seealso: - duk_eval_lstring_noresult introduced: 1.0.0