Hex("text")
Hex(num)
Char To Hex is an alias.
Hex To Blob(“hexstring”)
Hex To Char(“hexstring”, encoding)
Char To Blob(string, encoding)
Converts a string of characters into a binary (blob).
Blob To Char(blob, encoding)
Blob Peek(blob, offset, length)
Returns a new BLOB that is a subset of the given BLOB that is length bytes long and begins at the offset. Note that the offset is 0-based.
Hex (string) returns the hexadecimal codes for each character in the argument. For example,
Hex to Char (string) converts hexadecimal to characters. The resulting character string might not be valid display characters. All the characters must be in pairs, in the ranges 0-9, A-Z, and a-z. Blanks and commas are allowed, and skipped. For example,
Hex and Hex To Char are inverses of each other, so
Hex To Blob(string) takes a string of hexadecimal codes and converts it to a binary object.
a = Hex To Blob("6A6B6C"); Show(a);
Blob Peek(blob,offset,length) extracts bytes as defined by the arguments from a blob.
b = Blob Peek(a,1,2); Show(b);
b = Blob Peek(a,0,2); Show(b);
b = Blob Peek(a,2); Show(b);
Hex(blob) converts a blob into hexadecimal.
Concat(blob1,blob2) or blob1 || blob2 concatenates two blobs.
length(blob) returns the number of bytes in a blob.
Any hex code outside the ASCII range (space to }, or hex 20 - 7D) is encoded as the three-character sequence [~][hexdigit][hexdigit]. For example,
Char To Blob(string) creates a blob from a string, converting ~hex codes. Blob To Char(blob) creates a string with ~hex codes to indicate non-visible and non-ASCII codes.