pattern

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: Apache-2.0, MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPct = errors.New("invalid use of '%'")

Functions

func ErrInvalidCaptureIdx

func ErrInvalidCaptureIdx(i int) error

Types

type Capture

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

func (Capture) End

func (c Capture) End() int

func (Capture) IsEmpty

func (c Capture) IsEmpty() bool

func (Capture) Start

func (c Capture) Start() int

type Pattern

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

func New

func New(ptn string) (*Pattern, error)

func (*Pattern) Match

func (p *Pattern) Match(s string, init int) []Capture

func (*Pattern) MatchFromStart

func (p *Pattern) MatchFromStart(s string, init int) []Capture

Jump to

Keyboard shortcuts

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