mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
revert file
This commit is contained in:
@ -138,3 +138,12 @@ func ReplaceStringFuncMatch(pattern string, src string, replaceFunc func(match [
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
|
||||
// Split slices `src` into substrings separated by the expression and returns a slice of
|
||||
// the substrings between those expression matches.
|
||||
func Split(pattern string, src string) []string {
|
||||
if r, err := getRegexp(pattern); err == nil {
|
||||
return r.Split(src, -1)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user