minigame-std
    Preparing search index...

    Function textDecode

    • 将二进制数据解码为字符串(UTF-8 解码)。

      Parameters

      • data: BufferSource

        需要解码的二进制数据。

      Returns string

      解码后的字符串。

      const decoded = textDecode(new Uint8Array([228, 189, 160, 229, 165, 189]));
      console.log(decoded); // '你好'