Documentation ¶
Overview ¶
Match provides a simple pattern matcher with unicode support.
Index ¶
- Variables
- func Allowable(pattern string) (min, max string)
- func AnchorName(text string) string
- func Camel(s string) string
- func ConvertToCamelCase(in string) string
- func ConvertToSnackCase(in string) string
- func FormatLen(s string, length int) string
- func HasHan(s string) bool
- func HasPrefixes(s string, prefixes []string) bool
- func In(s string, ss []string) bool
- func IsASCIIDigit(c byte) bool
- func IsASCIILower(c byte) bool
- func IsPattern(str string) bool
- func LowerCase(c byte) byte
- func LowerFirst(t string) string
- func Match(str, pattern string) bool
- func QuoteToBytes(s string) []byte
- func ReplaceRuneEmpty(s string, old []rune) string
- func ToBytes(s string) []byte
- func ToString(b []byte) string
- func UpperCase(c byte) byte
Constants ¶
This section is empty.
Variables ¶
View Source
var HanPunctuation = []rune{
'\u3002', '\uff1b', '\uff0c', '\uff1a', '\u201c', '\u201d', '\uff08', '\uff09', '\u3001', '\uff1f', '\u300a', '\u300b',
}
[。;,:“”()、?《》]
Functions ¶
func Allowable ¶
Allowable parses the pattern and determines the minimum and maximum allowable values that the pattern can represent. When the max cannot be determined, 'true' will be returned for infinite.
func AnchorName ¶
Create returns a sanitized anchor name for the given text.
func ConvertToCamelCase ¶
func ConvertToSnackCase ¶
func Match ¶
pattern:
{ term }
term:
'*' matches any sequence of non-Separator characters '?' matches any single non-Separator character c matches character c (c != '*', '?', '\\') '\\' c matches character c
func QuoteToBytes ¶
func ReplaceRuneEmpty ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.