Struct regex::Match [−][src]
pub struct Match<'t> { /* fields omitted */ }
Match represents a single match of a regex in a haystack.
The lifetime parameter 't
refers to the lifetime of the matched text.
Implementations
impl<'t> Match<'t>
[src]
impl<'t> Match<'t>
[src]pub fn start(&self) -> usize
[src]
Returns the starting byte offset of the match in the haystack.
pub fn end(&self) -> usize
[src]
Returns the ending byte offset of the match in the haystack.
pub fn range(&self) -> Range<usize>
[src]
Returns the range over the starting and ending byte offsets of the match in the haystack.
pub fn as_str(&self) -> &'t str
[src]
Returns the matched text.