MCPcopy Create free account
hub / github.com/davidblewett/rure-python / peek

Method peek

regex/regex-syntax/src/ast/parse.rs:583–588  ·  view source on GitHub ↗

Peek at the next character in the input without advancing the parser. If the input has been exhausted, then this returns `None`.

(&self)

Source from the content-addressed store, hash-verified

581 ///
582 /// If the input has been exhausted, then this returns `None`.
583 fn peek(&self) -> Option<char> {
584 if self.is_eof() {
585 return None;
586 }
587 self.pattern()[self.offset() + self.char().len_utf8()..].chars().next()
588 }
589
590 /// Like peek, but will ignore spaces when the parser is in whitespace
591 /// insensitive mode.

Callers 5

replacenMethod · 0.80
replacenMethod · 0.80
compileMethod · 0.80
peek_spaceMethod · 0.80
parse_set_classMethod · 0.80

Calls 6

offsetMethod · 0.80
len_utf8Method · 0.80
is_eofMethod · 0.45
nextMethod · 0.45
patternMethod · 0.45
charMethod · 0.45

Tested by

no test coverage detected