pm

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: MIT Imports: 1 Imported by: 27

Documentation

Overview

Lua pattern match functions for Go

Index

Constants

View Source
const EOS = -1

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Pos     int
	Message string
}

func (*Error) Error

func (e *Error) Error() string

type MatchData

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

func Find

func Find(p string, src []byte, offset, limit int) (matches []*MatchData, err error)

func (*MatchData) Capture

func (st *MatchData) Capture(idx int) int

func (*MatchData) CaptureLength

func (st *MatchData) CaptureLength() int

func (*MatchData) IsPosCapture

func (st *MatchData) IsPosCapture(idx int) bool

Jump to

Keyboard shortcuts

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