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

Method find_nfa

regex/src/exec.rs:907–930  ·  view source on GitHub ↗

Like find, but executes an NFA engine.

(
        &self,
        ty: MatchNfaType,
        text: &[u8],
        start: usize,
    )

Source from the content-addressed store, hash-verified

905
906 /// Like find, but executes an NFA engine.
907 fn find_nfa(
908 &self,
909 ty: MatchNfaType,
910 text: &[u8],
911 start: usize,
912 ) -> Option<(usize, usize)> {
913 let mut slots = [None, None];
914 if self.exec_nfa(
915 ty,
916 &mut [false],
917 &mut slots,
918 false,
919 text,
920 start,
921 text.len()
922 ) {
923 match (slots[0], slots[1]) {
924 (Some(s), Some(e)) => Some((s, e)),
925 _ => None,
926 }
927 } else {
928 None
929 }
930 }
931
932 /// Like find_nfa, but fills in captures.
933 ///

Callers 1

find_atMethod · 0.80

Calls 2

exec_nfaMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected