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

Method new

crates/sre_engine/src/engine.rs:24–42  ·  view source on GitHub ↗
(
        string: S,
        start: usize,
        end: usize,
        pattern_codes: &'a [u32],
        match_all: bool,
    )

Source from the content-addressed store, hash-verified

22
23impl<'a, S: StrDrive> Request<'a, S> {
24 pub fn new(
25 string: S,
26 start: usize,
27 end: usize,
28 pattern_codes: &'a [u32],
29 match_all: bool,
30 ) -> Self {
31 let end = core::cmp::min(end, string.count());
32 let start = core::cmp::min(start, end);
33
34 Self {
35 string,
36 start,
37 end,
38 pattern_codes,
39 match_all,
40 must_advance: false,
41 }
42 }
43}
44
45#[derive(Debug)]

Callers

nothing calls this directly

Calls 2

minFunction · 0.85
countMethod · 0.45

Tested by

no test coverage detected