hexToBin

Convert a string of hex digits to a byte array. This is only useful for RT strings. If one needs to do this with literals, x"FF FF" is a better approach.

bool
hexToBin
(,
ref ubyte[] buf
)

Parameters

str cstring

the string of hex digits to be converted

buf ubyte[]

a byte array where the values will be stored

Return Value

Type: bool

true if conversion succeeded, false if the length of the string is odd, or any of the characters is not valid hex digit.

Meta