ptglob

package module
v1.3.2 Latest Latest
Warning

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

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

README

Simple glob matching and rewriting engine in golang

ptglob

go get git.pixeltamer.net/gopub/ptglob

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Match

func Match(pattern, text string) bool
Example
fmt.Printf("%v\n", Match("*", "abc"))
fmt.Printf("%v\n", Match("a*", "abc"))
fmt.Printf("%v\n", Match("b*", "abc"))
fmt.Println(MatchParts("a*", "abc"))
Output:

true
true
false
true [bc]

func MatchParts

func MatchParts(pattern, text string) (bool, []string)

func Rewrite

func Rewrite(pattern, text, rewrite string) (bool, string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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