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

Method char_at

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

Return the character at the given position. This panics if the given position does not point to a valid char.

(&self, i: usize)

Source from the content-addressed store, hash-verified

469 ///
470 /// This panics if the given position does not point to a valid char.
471 fn char_at(&self, i: usize) -> char {
472 self.pattern()[i..].chars().next()
473 .unwrap_or_else(|| {
474 panic!("expected char at offset {}", i)
475 })
476 }
477
478 /// Bump the parser to the next Unicode scalar value.
479 ///

Callers 1

charMethod · 0.80

Calls 2

nextMethod · 0.45
patternMethod · 0.45

Tested by

no test coverage detected