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.

27 lines
669 B

=proto
void duk_decode_string(duk_context *ctx, int index, duk_decode_char_function callback, void *udata);
=stack
[ ... val! ... ]
=summary
<p>Process string at <tt>index</tt>, calling <tt>callback</tt> for each codepoint
of the string. The callback is given the <tt>udata</tt> argument and a codepoint.
The input string is not modified. If the value is not a string or the index is
invalid, throws an error.</p>
=example
static void decode_char(void *udata, int codepoint) {
printf("codepoint: %d\n", codepoint);
}
duk_push_string(ctx, "test_string");
duk_decode_string(ctx, -1, decode_char, NULL);
=tags
string
=fixme
Currently implemented. Necessary?