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

Method shortest_match_at

regex/src/re_unicode.rs:627–633  ·  view source on GitHub ↗

Returns the same as shortest_match, but starts the search at the given offset. The significance of the starting point is that it takes the surrounding context into consideration. For example, the `\A` anchor can only match when `start == 0`.

(
        &self,
        text: &str,
        start: usize,
    )

Source from the content-addressed store, hash-verified

625 /// context into consideration. For example, the `\A` anchor can only
626 /// match when `start == 0`.
627 pub fn shortest_match_at(
628 &self,
629 text: &str,
630 start: usize,
631 ) -> Option<usize> {
632 self.0.searcher_str().shortest_match_at(text, start)
633 }
634
635 /// Returns the same as is_match, but starts the search at the given
636 /// offset.

Callers 2

shortest_matchMethod · 0.45
is_match_atMethod · 0.45

Calls 1

searcher_strMethod · 0.80

Tested by

no test coverage detected