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.
25 lines
479 B
25 lines
479 B
=proto
|
|
void duk_hex_decode(duk_context *ctx, int index);
|
|
|
|
=stack
|
|
[ ... hex_val! ... ] -> [ ... val! ... ]
|
|
|
|
=summary
|
|
<p>Decodes a hex encoded value into a buffer as an in-place operation.
|
|
If the input is invalid, throws an error.</p>
|
|
|
|
=example
|
|
duk_push_string(ctx, "7465737420737472696e67");
|
|
duk_hex_decode(ctx, -1); /* buffer */
|
|
printf("hex decoded: %s\n", duk_to_string(ctx, -1));
|
|
duk_pop(ctx);
|
|
|
|
/* Output:
|
|
* hex decoded: test string
|
|
*/
|
|
|
|
=tags
|
|
codec
|
|
|
|
=seealso
|
|
duk_hex_encode
|
|
|