Theia API Documentation v1.65.0
    Preparing search index...
    • Encodes the content of a string to a Uint8Array.

      Will pick an encoding based on settings.

      Parameters

      • content: string

        The content to decode as a string.

      Returns Thenable<Uint8Array>

      A thenable that resolves to the encoded Uint8Array.

    • Encodes the content of a string to a Uint8Array using the provided encoding.

      Parameters

      • content: string

        The content to decode as a string.

      • options: { encoding: string }

        Additional context for picking the encoding.

        • Readonlyencoding: string

          Allows to explicitly pick the encoding to use. See TextDocument.encoding for more information about valid values for encoding. Using an unsupported encoding will fallback to the default configured encoding.

      Returns Thenable<Uint8Array>

      A thenable that resolves to the encoded Uint8Array.

    • Encodes the content of a string to a Uint8Array.

      The encoding is picked based on settings.

      Parameters

      • content: string

        The content to decode as a string.

      • options: { uri: Uri }

        Additional context for picking the encoding.

        • Readonlyuri: Uri

          The URI that represents the file if known. This information is used to figure out the encoding related configuration for the file if any.

      Returns Thenable<Uint8Array>

      A thenable that resolves to the encoded Uint8Array.