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

Method captures_read

regex/src/re_bytes.rs:614–620  ·  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 [u8],
    )

Source from the content-addressed store, hash-verified

612 /// This returns the overall match if this was successful, which is always
613 /// equivalence to the `0`th capture group.
614 pub fn captures_read<'t>(
615 &self,
616 locs: &mut CaptureLocations,
617 text: &'t [u8],
618 ) -> Option<Match<'t>> {
619 self.captures_read_at(locs, text, 0)
620 }
621
622 /// Returns the same as `captures_read`, but starts the search at the given
623 /// 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