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

std/encoding/hex.ts>decodeString

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function decodeString
import { decodeString } from "https://deno.land/std@0.42.0/encoding/hex.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