kaven-basic - v6.0.0
    Preparing search index...

    Function String2ArrayBuffer

    • Converts a string into an ArrayBuffer where each character is represented by its UTF-16 code unit (lower 8 bits).

      Parameters

      • str: string

        The input string to convert.

      Returns ArrayBuffer

      An ArrayBuffer containing the UTF-8 encoded bytes of the input string.

      This function encodes each character of the string as a single byte, using the character's char code. Characters with code points above 255 will be truncated to fit into a single byte. For full Unicode support, consider using TextEncoder instead.

      4.0.0

      2021-12-11