Documentation
¶
Overview ¶
Package textsearch shares find/replace semantics between the editor and server.
Index ¶
- type Match
- type Options
- type Pattern
- func (p *Pattern) FindAll[T string | []byte](content T, dst []Match, limit int) []Match
- func (p *Pattern) FindRange[T string | []byte](content T, dst []Match, start, end, limit int, countAll bool) ([]Match, int)
- func (p *Pattern) Replace(content, replacement string, matches []Match) string
- func (p *Pattern) Replacement(content string, match Match, replacement string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pattern ¶
type Pattern struct {
// contains filtered or unexported fields
}
func (*Pattern) FindAll ¶
FindAll reuses caller-owned storage. A negative limit retains every match.
func (*Pattern) FindRange ¶
func (p *Pattern) FindRange[T string | []byte](content T, dst []Match, start, end, limit int, countAll bool) ([]Match, int)
FindRange keeps document-relative offsets and word/regexp boundary semantics. countAll counts matches beyond the storage limit without retaining them.