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

x/polkadot/util/mod.ts>stringToU8a

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

Examples

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

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

Parameters

optional
value: AnyString | null

Returns

Uint8Array