Function stringToBytes

  • Converts a UTF-16 string (AssemblyScript's default) to a UTF-8 encoded StaticArray.

    Parameters

    • str: string

      the string to convert

    Returns StaticArray<u8>

    A StaticArray representation of the input string.

    Remarks

    If the string is empty, returns an empty array.

Generated using TypeDoc