wildcard

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasPrefix added in v1.2.7

func HasPrefix(pattern, s string) bool

HasPrefix tests whether the pattern string begins with prefix s. supports '*' and '?' wildcards in the pattern string. alias for StartsWith.

func HasPrefixFold added in v1.2.7

func HasPrefixFold(pattern, s string) bool

HasPrefixFold tests whether the pattern string begins with prefix s. supports '*' and '?' wildcards in the pattern string. case insensitive. alias for StartsWithFold.

func HasPrefixSimple added in v1.2.7

func HasPrefixSimple(pattern, s string) bool

HasPrefixSimple tests whether the pattern string begins with prefix s. supports only '*' wildcard in the pattern. alias for StartsWithSimple.

func HasPrefixSimpleFold added in v1.2.7

func HasPrefixSimpleFold(pattern, s string) bool

HasPrefixSimpleFold tests whether the pattern string begins with prefix s. supports only '*' wildcard in the pattern. case insensitive. alias for StartsWithSimpleFold.

func Match

func Match(pattern, s string) bool

Match tests whether the string s matches/satisfies the pattern string. supports '*' and '?' wildcards in the pattern string. case insensitive. unlike path.Match(), considers a path as a flat name space while matching the pattern.

func MatchFold

func MatchFold(pattern, s string) bool

MatchFold tests whether the string s 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.

func MatchSimple

func MatchSimple(pattern, s string) bool

MatchSimple tests whether the string s matches/satisfies the pattern string. supports only '*' wildcard in the pattern. considers a file system path as a flat name space.

func MatchSimpleFold

func MatchSimpleFold(pattern, s string) bool

MatchSimpleFold tests whether the string s matches/satisfies the pattern string. supports only '*' wildcard in the pattern. case insensitive. considers a file system path as a flat name space.

func StartsWith added in v1.2.7

func StartsWith(pattern, s string) bool

StartsWith tests whether the pattern string begins with prefix s. supports '*' and '?' wildcards in the pattern string.

func StartsWithFold added in v1.2.7

func StartsWithFold(pattern, s string) bool

StartsWithFold tests whether the pattern string begins with prefix s. supports '*' and '?' wildcards in the pattern string. case insensitive.

func StartsWithSimple added in v1.2.7

func StartsWithSimple(pattern, s string) bool

StartsWithSimple tests whether the pattern string begins with prefix s. supports only '*' wildcard in the pattern.

func StartsWithSimpleFold added in v1.2.7

func StartsWithSimpleFold(pattern, s string) bool

StartsWithSimpleFold tests whether the pattern string begins with prefix s. supports only '*' wildcard in the pattern. case insensitive.

Types

This section is empty.

Jump to

Keyboard shortcuts

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