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.
29 lines
706 B
29 lines
706 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 <code>index</code>, calling <code>callback</code> for each codepoint
|
|
of the string. The callback is given the <code>udata</code> 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
|
|
|
|
=seealso
|
|
duk_map_string
|
|
|
|
=fixme
|
|
Currently implemented. Necessary?
|
|
|
|
|