decode-hex <data> to <output> \
[ input-length <input length> ]
Copied!
decode-hex will decode hexadecimal string <data> to string <output> given in "to" clause.
<data> must consist of an even number of digits 0-9 and letters A-F or a-f. The length of <data> may be given by <input length> number in "input-length" clause, otherwise it is assumed to be the string length of <data>.
Examples
Get the original binary data from a hexadecimal string "hexdata". The output string "binout" is created:
set-string hexdata = "0041000F414200" decode-hex hexdata to binout
Copied!
The value of "binout" will be binary data equal to this C literal: