Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/std/encoding/mod.ts>decodeHexString

A modern runtime for JavaScript and TypeScript.
Go to Latest
function decodeHexString
import { decodeHexString } from "https://deno.land/x/deno@v0.28.0/std/encoding/mod.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 throws an error.

Parameters

s: string

the string need to decode to Uint8Array

Returns

Uint8Array