Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for LiteralPrefix (0.17 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. api/go1.txt

    pkg regexp, method (*Regexp) FindStringSubmatchIndex(string) []int
    pkg regexp, method (*Regexp) FindSubmatch([]uint8) [][]uint8
    pkg regexp, method (*Regexp) FindSubmatchIndex([]uint8) []int
    pkg regexp, method (*Regexp) LiteralPrefix() (string, bool)
    pkg regexp, method (*Regexp) Match([]uint8) bool
    pkg regexp, method (*Regexp) MatchReader(io.RuneReader) bool
    pkg regexp, method (*Regexp) MatchString(string) bool
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
Back to top