span

package
v0.0.0-...-22e6c3c Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareRanges

func CompareRanges(a, b Span) int

Types

type Span

type Span struct {
	Start, End int
}

func (Span) Adjacent

func (r Span) Adjacent(other Span) bool

func (Span) Combine

func (r Span) Combine(other Span) (Span, bool)

func (Span) Contains

func (r Span) Contains(i int) bool

func (Span) Intersect

func (r Span) Intersect(other Span) bool

func (Span) IsEmpty

func (r Span) IsEmpty() bool

func (Span) Len

func (r Span) Len() int

func (Span) SplitAt

func (r Span) SplitAt(i int) (Span, Span)

func (Span) SplitOtherRange

func (r Span) SplitOtherRange(other Span) (Span, Span, Span)

func (Span) String

func (r Span) String() string

type SpanList

type SpanList []Span

func (*SpanList) Compact

func (r *SpanList) Compact() SpanList

func (SpanList) FilterEmpty

func (r SpanList) FilterEmpty() SpanList

func (SpanList) IsSorted

func (r SpanList) IsSorted() bool

func (SpanList) Len

func (r SpanList) Len() int

func (SpanList) Less

func (r SpanList) Less(i, j int) bool

func (SpanList) Sort

func (r SpanList) Sort()

func (SpanList) Swap

func (r SpanList) Swap(i, j int)

Jump to

Keyboard shortcuts

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