regexp2gen

package module
v0.0.0-...-ae7ad07 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 8 Imported by: 0

README

GoDoc

regex2gen

gen string from regex2 regex.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewState

func NewState(debug bool, limit int, chars []rune, seed int64) *state

Types

type Buffer

type Buffer struct {
	*bytes.Buffer
	// contains filtered or unexported fields
}

func NewBuffer

func NewBuffer() *Buffer

func (*Buffer) Backmark

func (b *Buffer) Backmark(capture bool, index int) error

pop

func (*Buffer) Getmark

func (b *Buffer) Getmark(index int) (*bytes.Buffer, bool)

func (*Buffer) Setmark

func (b *Buffer) Setmark()

push

func (*Buffer) WriteAll

func (b *Buffer) WriteAll(p []byte) (n int, err error)

type Generator

type Generator struct{}

func NewGenerator

func NewGenerator() *Generator

create a new generator

func (*Generator) Generate

func (g *Generator) Generate(s *state, re string, op regexp2.RegexOptions) (string, error)

Jump to

Keyboard shortcuts

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