Encodes a text string into a Uint8Array using UTF-8 encoding.
The string to encode
A Uint8Array containing the encoded text
const bytes = encodeText('Hello'); Copy
const bytes = encodeText('Hello');
Encodes a text string into a Uint8Array using UTF-8 encoding.