matching

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDone error
)

Functions

func MaxParallel

func MaxParallel(elems []func(), max int)

func SplitIntoGroups

func SplitIntoGroups[T any](elems []T, count int) (map[int][]T, error)

Types

type Parallel

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

func (Parallel) Match

func (p Parallel) Match() ParallelInfo

type ParallelInfo

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

func (*ParallelInfo) Step

func (pi *ParallelInfo) Step(char *rune)

type StateMachiner

type StateMachiner interface {
	Step(char *rune)
	IsDone() bool
	Err() error
}

type WordMatcher

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

func NewWordMatcher

func NewWordMatcher(word string) (*WordMatcher, error)

func (WordMatcher) CharAt

func (wm WordMatcher) CharAt(idx int) (rune, bool)

func (WordMatcher) Match

func (wm WordMatcher) Match() WordMatcherInfo

func (WordMatcher) Size

func (wm WordMatcher) Size() int

type WordMatcherInfo

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

func (*WordMatcherInfo) Err

func (wmi *WordMatcherInfo) Err() error

func (*WordMatcherInfo) IsDone

func (wmi *WordMatcherInfo) IsDone() bool

func (*WordMatcherInfo) Step

func (wmi *WordMatcherInfo) Step(char *rune)

Jump to

Keyboard shortcuts

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