CML
    Preparing search index...

    Function decodeText

    • Converts an ArrayBuffer or ArrayBufferView to a string. Similar to TextDecoder.decode but with a fallback for environments that don't support TextDecoder.

      Parameters

      Returns string

      The string representation of the ArrayBuffer.

      const str = 'hello world'
      const utf8 = new Uint8Array(strToCodes(str))
      equal(decodeText(utf8.buffer, { encoding: UTF_8 }), str)