MCPcopy Index your code
hub / github.com/RustPython/RustPython / at_boundary

Method at_boundary

crates/sre_engine/src/engine.rs:1131–1142  ·  view source on GitHub ↗
(
        &self,
        req: &Request<'_, S>,
        mut word_checker: F,
    )

Source from the content-addressed store, hash-verified

1129 }
1130
1131 fn at_boundary<S: StrDrive, F: FnMut(u32) -> bool>(
1132 &self,
1133 req: &Request<'_, S>,
1134 mut word_checker: F,
1135 ) -> bool {
1136 if self.at_beginning() && self.at_end(req) {
1137 return false;
1138 }
1139 let that = !self.at_beginning() && word_checker(self.back_peek_char::<S>());
1140 let this = !self.at_end(req) && word_checker(self.peek_char::<S>());
1141 this != that
1142 }
1143
1144 fn at_non_boundary<S: StrDrive, F: FnMut(u32) -> bool>(
1145 &self,

Callers 1

atFunction · 0.80

Calls 2

at_beginningMethod · 0.80
at_endMethod · 0.45

Tested by

no test coverage detected