MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / find

Method find

src/rgx.rs:84–98  ·  view source on GitHub ↗
(&self, text: &str)

Source from the content-addressed store, hash-verified

82 self.find(text).is_some()
83 }
84 pub fn find(&self, text: &str) -> Option<(usize, usize)>
85 {
86 let text: Vec<char> = text.chars().collect();
87 let re: Vec<char> = self.0.chars().collect();
88 let mut start = 0;
89 let mut end = 0;
90 if ismatch(&re[..], &text[..], &mut start, &mut end)
91 {
92 Some((start, end))
93 }
94 else
95 {
96 None
97 }
98 }
99}
100
101

Callers 1

ismatchMethod · 0.45

Calls 1

ismatchFunction · 0.85

Tested by

no test coverage detected