Encodes a string as UTF-8 bytes.
The inverse of toUtf8. Use it instead of new TextEncoder().encode(s).
new TextEncoder().encode(s)
The string to encode.
The UTF-8 bytes.
1.0.4
import { fromUtf8 } from 'edgeport/util';fromUtf8('hi'); // Uint8Array [0x68, 0x69] Copy
import { fromUtf8 } from 'edgeport/util';fromUtf8('hi'); // Uint8Array [0x68, 0x69]
Encodes a string as UTF-8 bytes.
The inverse of toUtf8. Use it instead of
new TextEncoder().encode(s).