=proto const char *duk_get_lstring(duk_context *ctx, int index, size_t *out_len); =stack [ ... val! ... ] =summary
Get character data pointer and length for a string at index
without modifying or coercing the value. Returns a non-NULL
pointer to the read-only, NUL-terminated string data, and writes the
string byte length to *out_len
(if out_len
is
non-NULL
). Returns NULL
and writes zero to *out_len
(if out_len
is non-NULL
) if the value is not a string or
the index is invalid.
To get the string character length (instead of byte length), use
duk_get_length()
.
NULL
return value is guaranteed even for zero length strings;
this differs from how buffer data pointers are handled (for technical reasons).