Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Match ¶
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 MatchAsPatternPrefix ¶
MatchAsPatternPrefix matches text as a prefix of the given pattern. Examples:
| Pattern | Text | Match Result | ==================================== | abc* | ab | True | | abc* | abd | False | | abc*c | abcd | True | | ab*??d | abxxc | True | | ab*??d | abxc | True | | ab??d | abxc | True | | ab??d | abc | True | | ab??d | abcxdd | False |
This function is only useful in some special situations.
func MatchSimple ¶
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.