Skip to main content
The Deno 2 Release Candidate is 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.94.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 throw an error.

Parameters

s: string

the string to decode to Uint8Array

Returns

Uint8Array