Struct oniguruma::Region [] [src]

pub struct Region {
    // some fields omitted
}

Representation of regex search result.

Methods

impl Region

fn new() -> Region

Create empty region.

fn len(&self) -> usize

Returns the number of captured groups.

fn pos(&self, pos: usize) -> Option<(usize, usize)>

Returns the start and end positions of the Nth capture group. Returns None if i is not a valid capture group or if the capture group did not match anything. The positions returned are always byte indices with respect to the original string matched.

fn tree(&self) -> Option<&CaptureTreeNode>

fn clear(&mut self)

Clear contents of region.

Trait Implementations

Derived Implementations

impl Debug for Region

fn fmt(&self, __arg_0: &mut Formatter) -> Result