segments

package
v1.52.2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: MPL-2.0 Imports: 1 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Scan

func Scan(haystack LengthIter, needle Extent, callback Callback) bool

Types

type Callback

type Callback = func(int, Extent) bool

type Extent

type Extent struct {
	Start, Length Int
}

func (Extent) End

func (e Extent) End() Int

type Index

type Index struct {
	// contains filtered or unexported fields
}

func NewIndex

func NewIndex(segments LengthIter) (ret Index)

func (Index) Locate

func (me Index) Locate(e Extent, output Callback) bool

type Int

type Int = int64

type Length

type Length = Int

type LengthIter

type LengthIter = func() (Length, bool)

type Locater

type Locater func(Extent, Callback) bool

func LocaterFromLengthIter

func LocaterFromLengthIter(li LengthIter) Locater

Jump to

Keyboard shortcuts

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