Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for canCheckPrefix (0.36 sec)

  1. src/regexp/exec.go

    				// Anchored match, past beginning of text.
    				break
    			}
    			if m.matched {
    				// Have match; finished exploring alternatives.
    				break
    			}
    			if len(m.re.prefix) > 0 && r1 != m.re.prefixRune && i.canCheckPrefix() {
    				// Match requires literal prefix; fast search for it.
    				advance := i.index(m.re, pos)
    				if advance < 0 {
    					break
    				}
    				pos += advance
    				r, width = i.step(pos)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Jun 04 20:10:54 UTC 2022
    - 12.3K bytes
    - Viewed (0)
  2. src/regexp/regexp.go

    const endOfText rune = -1
    
    // input abstracts different representations of the input text. It provides
    // one-character lookahead.
    type input interface {
    	step(pos int) (r rune, width int) // advance one rune
    	canCheckPrefix() bool             // can we look ahead without losing info?
    	hasPrefix(re *Regexp) bool
    	index(re *Regexp, pos int) int
    	context(pos int) lazyFlag
    }
    
    // inputString scans a string.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:50:01 UTC 2024
    - 38.5K bytes
    - Viewed (0)
Back to top