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

Method next

regex/src/re_trait.rs:72–84  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

70 type Item = Option<(usize, usize)>;
71
72 fn next(&mut self) -> Option<Option<(usize, usize)>> {
73 if self.idx >= self.locs.len() {
74 return None;
75 }
76 let x = match self.locs.pos(self.idx) {
77 None => Some(None),
78 Some((s, e)) => {
79 Some(Some((s, e)))
80 }
81 };
82 self.idx += 1;
83 x
84 }
85}
86
87/// `RegularExpression` describes types that can implement regex searching.

Callers

nothing calls this directly

Calls 7

as_refMethod · 0.80
lenMethod · 0.45
posMethod · 0.45
find_atMethod · 0.45
next_after_emptyMethod · 0.45
locationsMethod · 0.45
captures_read_atMethod · 0.45

Tested by

no test coverage detected