=proto const char *duk_require_string(duk_context *ctx, int index); =stack [ ... val! ... ] =summary

Like duk_get_string(), but throws an error if the value at index is not a string or if the index is invalid.

=example const char *buf; buf = duk_require_string(ctx); printf("value is a string: %s\n", buf); =tags stack string