- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for LiteralPrefix (0.2 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) -
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)