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

x/polkadot/mod.ts>util.stringToU8a

Package publishing for deno.land/x/polkadot
Go to Latest
function util.stringToU8a
import { util } from "https://deno.land/x/polkadot@0.2.27/mod.ts";
const { stringToU8a } = util;

Examples

import { stringToU8a } from 'https://deno.land/x/polkadot@0.2.27/util/mod.ts';

stringToU8a('hello'); // [0x68, 0x65, 0x6c, 0x6c, 0x6f]

Parameters

optional
value: AnyString | null

Returns

Uint8Array