decode(_:to:)

Decodes an ASCII-encoded base-16 string to some RangeReplaceableCollection type. The order of the decoded bytes in the output matches the order of the (pairs of) hexadecimal digits in the input.

Base16.swift:39
static func decode<ASCII, Bytes>(_ ascii: ASCII, to _: Bytes.Type = Bytes.self) -> Bytes where ASCII : Sequence, Bytes : RangeReplaceableCollection, ASCII.Element == UInt8, Bytes.Element == UInt8

Characters (including UTF-8 continuation bytes) that are not base-16 digits will be skipped. If the input does not yield an even number of digits, the trailing digit will be ignored.