the string to be converted.
the integer type of an array element. By default it is set to ubyte but all the integer types, excepted ulong and long, are accepted.
an array of T.
// conversion at compile time auto array1 = hexBytes!"304A314B"; assert(array1 == [0x30, 0x4A, 0x31, 0x4B]); // conversion at run time auto arbitraryData = "30 4A 31 4B"; auto array2 = hexBytes(arbitraryData); assert(array2 == [0x30, 0x4A, 0x31, 0x4B]);
The hexBytes function is similar to the hexString one except that it returns the hexadecimal data as an array of integral.