wildcard

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: AGPL-3.0 Imports: 0 Imported by: 31

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Match

func Match(pattern, name string) (matched bool)

Match - finds whether the text matches/satisfies the pattern string. supports '*' and '?' wildcards in the pattern string. unlike path.Match(), considers a path as a flat name space while matching the pattern. The difference is illustrated in the example here https://play.golang.org/p/Ega9qgD4Qz .

func MatchSimple

func MatchSimple(pattern, name string) bool

MatchSimple - finds whether the text matches/satisfies the pattern string. supports '*' wildcard in the pattern and ? for single characters. Only difference to Match is that `?` at the end is optional, meaning `a?` pattern will match name `a`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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