You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
449 B

=proto
const char *duk_require_lstring(duk_context *ctx, int index, size_t *out_len);
=stack
[ ... val! ... ]
=summary
<p>Like <code><a href="#duk_get_lstring">duk_get_lstring()</a></code>,
but throws an error if the value at <code>index</code> is not a string
or if the index is invalid.</p>
=example
const char *buf;
size_t len;
buf = duk_require_lstring(ctx, -3, &len);
printf("value is a string, %d bytes\n", (int) len);
=tags
stack
string