Skip to main content

stringToUtf8Bytes() function

Encodes a string to a Uint8Array using the utf-8 encoding.

Signature:

export declare function stringToUtf8Bytes(s: string): Uint8Array

Parameters

Parameter

Type

Description

s

string

the string to be encoded

**Returns:**

Uint8Array