MINOR: sample: add the hex2i converter

Converts a hex string containing two hex digits per input byte to an
integer. If the input value can not be converted, then zero is returned.
2 files changed