Documentation ¶
Index ¶
- func IsMatch(pattern string, src []byte) bool
- func IsMatchString(pattern string, src string) bool
- func MatchAllString(pattern string, src string) ([][]string, error)
- func MatchString(pattern string, src string) ([]string, error)
- func Replace(pattern string, replace, src []byte) ([]byte, error)
- func ReplaceString(pattern, replace, src string) (string, error)
- func ReplaceStringFuncMatch(pattern string, src string, replaceFunc func(match []string) string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsMatchString ¶
IsMatchString checks whether given string `src` matches `pattern`.
func MatchAllString ¶
MatchAllString return all strings that matched `pattern`.
func MatchString ¶
MatchString return strings that matched `pattern`.
func ReplaceString ¶
ReplaceString replace all matched `pattern` in string `src` with string `replace`.
func ReplaceStringFuncMatch ¶
func ReplaceStringFuncMatch(pattern string, src string, replaceFunc func(match []string) string) (string, error)
ReplaceStringFuncMatch replace all matched `pattern` in string `src` with custom replacement function `replaceFunc`. The parameter `match` type for `replaceFunc` is []string, which is the result contains all sub-patterns of `pattern` using MatchString function.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.