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

Method captures_read

regex/src/re_unicode.rs:671–677  ·  view source on GitHub ↗

This is like `captures`, but uses [`CaptureLocations`](struct.CaptureLocations.html) instead of [`Captures`](struct.Captures.html) in order to amortize allocations. To create a `CaptureLocations` value, use the `Regex::capture_locations` method. This returns the overall match if this was successful, which is always equivalence to the `0`th capture group.

(
        &self,
        locs: &mut CaptureLocations,
        text: &'t str,
    )

Source from the content-addressed store, hash-verified

669 /// This returns the overall match if this was successful, which is always
670 /// equivalence to the `0`th capture group.
671 pub fn captures_read<'t>(
672 &self,
673 locs: &mut CaptureLocations,
674 text: &'t str,
675 ) -> Option<Match<'t>> {
676 self.captures_read_at(locs, text, 0)
677 }
678
679 /// Returns the same as captures, but starts the search at the given
680 /// offset and populates the capture locations given.

Callers

nothing calls this directly

Calls 1

captures_read_atMethod · 0.45

Tested by

no test coverage detected