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

ParameterTypeDescription
sstringthe string to be encoded

Returns:

Uint8Array