• Encodes the given string into UTF-8 byte array. Throws if the source string has invalid UTF-16 encoding.

    Parameters

    • s: string

    Returns Uint8Array