pub struct RegexTool;Implementations§
Source§impl RegexTool
impl RegexTool
pub fn new() -> Self
pub fn is_match(&self, pattern: &str, text: &str) -> Result<bool>
pub fn find(&self, pattern: &str, text: &str) -> Result<Option<String>>
pub fn find_all(&self, pattern: &str, text: &str) -> Result<Vec<String>>
pub fn replace(&self, pattern: &str, text: &str, rep: &str) -> Result<String>
pub fn replace_all( &self, pattern: &str, text: &str, rep: &str, ) -> Result<String>
pub fn split(&self, pattern: &str, text: &str) -> Result<Vec<String>>
pub fn escape(&self, text: &str) -> String
pub fn validate(&self, pattern: &str) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RegexTool
impl RefUnwindSafe for RegexTool
impl Send for RegexTool
impl Sync for RegexTool
impl Unpin for RegexTool
impl UnsafeUnpin for RegexTool
impl UnwindSafe for RegexTool
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