- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for LiteralPrefix (0.32 sec)
-
src/regexp/all_test.go
// Literal method needs to scan the pattern. re := MustCompile(tc.pattern) str, complete := re.LiteralPrefix() if complete != tc.isLiteral { t.Errorf("LiteralPrefix(`%s`) = %t; want %t", tc.pattern, complete, tc.isLiteral) } if str != tc.literal { t.Errorf("LiteralPrefix(`%s`) = `%s`; want `%s`", tc.pattern, str, tc.literal) } } } type subexpIndex struct { name string
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:36:03 UTC 2024 - 25.8K bytes - Viewed (0) -
src/index/suffixarray/suffixarray.go
// or if n == 0. func (x *Index) FindAllIndex(r *regexp.Regexp, n int) (result [][]int) { // a non-empty literal prefix is used to determine possible // match start indices with Lookup prefix, complete := r.LiteralPrefix() lit := []byte(prefix) // worst-case scenario: no literal prefix if prefix == "" { return r.FindAllIndex(x.data, n) } // if regexp is a literal just use Lookup and convert its
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 9.5K bytes - Viewed (0) -
operator/pkg/validate/common.go
// literal compiles s into a literal regular expression, escaping any regexp // reserved characters. func literal(s string) *regexp.Regexp { re := match(regexp.QuoteMeta(s)) if _, complete := re.LiteralPrefix(); !complete { panic("must be a literal") } return re } // expression defines a full expression, where each regular expression must // follow the previous.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Aug 10 15:35:03 UTC 2023 - 11K bytes - Viewed (0) -
src/regexp/regexp.go
return -1 } func (i *inputReader) context(pos int) lazyFlag { return 0 // not used } // LiteralPrefix returns a literal string that must begin any match // of the regular expression re. It returns the boolean true if the // literal string comprises the entire regular expression. func (re *Regexp) LiteralPrefix() (prefix string, complete bool) { return re.prefix, re.prefixComplete }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 20:50:01 UTC 2024 - 38.5K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"(*Regexp).FindStringSubmatch", Method, 0}, {"(*Regexp).FindStringSubmatchIndex", Method, 0}, {"(*Regexp).FindSubmatch", Method, 0}, {"(*Regexp).FindSubmatchIndex", Method, 0}, {"(*Regexp).LiteralPrefix", Method, 0}, {"(*Regexp).Longest", Method, 1}, {"(*Regexp).MarshalText", Method, 21}, {"(*Regexp).Match", Method, 0}, {"(*Regexp).MatchReader", Method, 0}, {"(*Regexp).MatchString", Method, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)