pub struct Searcher {
pub re: Regex,
}
Expand description
Struct to abstract searching
Fields§
§re: Regex
Implementations§
source§impl Searcher
impl Searcher
sourcepub fn lfind(&mut self, st: &str) -> Option<Match>
pub fn lfind(&mut self, st: &str) -> Option<Match>
Find the next match, starting from the left hand side of the string
sourcepub fn rfind(&mut self, st: &str) -> Option<Match>
pub fn rfind(&mut self, st: &str) -> Option<Match>
Find the next match, starting from the right hand side of the string
sourcepub fn raw_to_char(x: usize, st: &str) -> usize
pub fn raw_to_char(x: usize, st: &str) -> usize
Converts a raw index into a character index, so that matches are in character indices
Auto Trait Implementations§
impl RefUnwindSafe for Searcher
impl Send for Searcher
impl Sync for Searcher
impl Unpin for Searcher
impl UnwindSafe for Searcher
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more