text

package
v0.1.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Utf16to8

func Utf16to8(b []byte, offset int) int

func Utf8to16

func Utf8to16(b []byte, offset int) int

Types

type Text

type Text = *text

func NewText

func NewText() Text

func (Text) Annotate

func (t Text) Annotate(text string)

func (Text) Append

func (t Text) Append(s []byte)

func (Text) AppendString

func (t Text) AppendString(s string)

func (Text) CR

func (t Text) CR()

func (Text) Clone

func (t Text) Clone() Text

func (Text) Cursor

func (t Text) Cursor() common.Pos

func (Text) FromPos

func (t Text) FromPos(enc common.Encoding, pos common.Pos) common.Pos

func (Text) FromRange

func (t Text) FromRange(enc common.Encoding, rang common.Range) common.Range

func (Text) IntoPos

func (t Text) IntoPos(enc common.Encoding, pos common.Pos) common.Pos

func (Text) IntoRange

func (t Text) IntoRange(enc common.Encoding, rang common.Range) common.Range

func (Text) Load

func (t Text) Load(path string) error

func (Text) MustLine

func (t Text) MustLine(n int) []byte

func (Text) Patch

func (t Text) Patch(ran common.Range, content string) (tree_sitter.InputEdit, bool, error)

func (Text) Print

func (t Text) Print()

func (Text) Rune

func (t Text) Rune(offset int) (rune, bool)

func (Text) Save

func (t Text) Save(path string) error

func (Text) Slice

func (t Text) Slice(rang common.Range) []byte

func (Text) Source

func (t Text) Source() []byte

func (Text) String

func (t Text) String() string

func (Text) Update

func (t Text) Update(content string) (tree_sitter.InputEdit, bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL