mirror of https://github.com/svaarala/duktape.git
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.
26 lines
618 B
26 lines
618 B
=proto
|
|
const char *duk_to_string(duk_context *ctx, duk_idx_t index);
|
|
|
|
=stack
|
|
[ ... val! ... ] -> [ ... ToString(val)! ... ]
|
|
|
|
=summary
|
|
<p>Replace the value at <code>index</code> with an Ecmascript
|
|
<a href="http://www.ecma-international.org/ecma-262/5.1/#sec-9.8">ToString()</a>
|
|
coerced value. Returns a non-<code>NULL</code> pointer to the read-only,
|
|
NUL-terminated string data. If <code>index</code> is invalid, throws an error.</p>
|
|
|
|
<div include="ref-custom-type-coercion.html" />
|
|
|
|
=example
|
|
printf("coerced string: %s\n", duk_to_string(ctx, -3));
|
|
|
|
=tags
|
|
stack
|
|
string
|
|
|
|
=seealso
|
|
duk_safe_to_string
|
|
|
|
=introduced
|
|
1.0.0
|
|
|