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

std/encoding/hex.ts>encodeHex

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function encodeHex
import { encodeHex } from "https://deno.land/std@0.220.1/encoding/hex.ts";

Converts data into a hex-encoded string.

Examples

Example 1

import { encodeHex } from "https://deno.land/std@0.220.1/encoding/hex.ts";

encodeHex("abc"); // "616263"

Parameters

src: string | Uint8Array | ArrayBuffer

Returns

string