Lens Scripting API

    Class TextDecoder

    Contains methods for Text decoding

    js var decoder = new TextDecoder() let decodedStr = decoder.decode([226,136,190,32,69,226,139,133,100,97]) print("decodedString="+decodedStr)

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Create a new instance of TextDecoder with specified encoding (optional, defaults to utf-8 if not provided).

      Parameters

      • Optionalencoding: string

      Returns TextDecoder

    Properties

    encoding: string

    The encoding format set in the TextDecoder.

    Methods

    • Decodes a Uint8Array as a string. utf8 by default.

      Parameters

      • data: Uint8Array

      Returns string

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean

    MMNEPVFCICPMFPCPTTAAATR