minigame-std
    Preparing search index...

    Function hexFromBuffer

    • 将 BufferSource 转换为十六进制字符串。

      Parameters

      • buffer: BufferSource

        需要转换的 BufferSource。

      Returns string

      十六进制字符串。

      const hex = hexFromBuffer(new Uint8Array([255, 0, 128]));
      console.log(hex); // 'ff0080'