Skip to main content
Deno 2 is finally here 🎉️
Learn more
function decodeHexString
import { decodeHexString } from "https://deno.land/x/bencode@v0.1.2/test/deps.ts";

DecodeString returns the bytes represented by the hexadecimal string s. DecodeString expects that src contains only hexadecimal characters and that src has even length. If the input is malformed, DecodeString will throw an error.

Parameters

s: string

the string to decode to Uint8Array

Returns

Uint8Array