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

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

example: | duk_eval_string(ctx, "'testString'.toUpperCase()"); printf("result is: %s\n", duk_get_string(ctx, -1)); duk_pop(ctx); tags: - compile seealso: - duk_eval_string_noresult introduced: 1.0.0