Documentation
¶
Index ¶
- Constants
- Variables
- func CompilePattern(pattern string, escape byte) (patWeights []rune, patTypes []byte)
- func Copy(src string) string
- func DoMatch(str string, patChars []rune, patTypes []byte) bool
- func IsExactMatch(patTypes []byte) bool
- func MemoizeStr(l func() string) fmt.Stringer
- type StringerFunc
- type StringerStr
Constants ¶
View Source
const ( // PatMatch is the enumeration value for per-character match. PatMatch = iota + 1 // PatOne is the enumeration value for '_' match. PatOne // PatAny is the enumeration value for '%' match. PatAny )
Variables ¶
View Source
var ErrSyntax = errors.New("invalid syntax")
ErrSyntax indicates that a value does not have the right syntax for the target type.
Functions ¶
func CompilePattern ¶
CompilePattern is a adapter for `CompilePatternInner`, `pattern` can be any unicode string.
func IsExactMatch ¶
IsExactMatch return true if no wildcard character
func MemoizeStr ¶
MemoizeStr returns memoized version of stringFunc.
Types ¶
type StringerFunc ¶
type StringerFunc func() string
StringerFunc defines string func implement fmt.Stringer.
type StringerStr ¶
type StringerStr string
StringerStr defines a alias to normal string. implement fmt.Stringer
Click to show internal directories.
Click to hide internal directories.