fromHexString

fnubyte[] fromHexString(String)(String hex) if (isSomeString!String) @safe pure

Converts a hex text string to a range of bytes.

Parameters

hexString representation of a hexdecimal-encoded byte array.

Returns

An newly allocated array of bytes.

Throws

Exception on invalid input.

Example:

ubyte[] dby  = "0xBA".fromHexString;

See Also

fromHexString for a range version of the function.