summaryrefslogtreecommitdiff
path: root/src/eval/str.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval/str.rs')
-rw-r--r--src/eval/str.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/eval/str.rs b/src/eval/str.rs
index 514bf318..a0345312 100644
--- a/src/eval/str.rs
+++ b/src/eval/str.rs
@@ -45,15 +45,10 @@ impl StrExt for EcoString {
pub struct Regex(regex::Regex);
impl Regex {
- /// Create a new regex.
+ /// Create a new regular expression.
pub fn new(re: &str) -> StrResult<Self> {
regex::Regex::new(re).map(Self).map_err(|err| err.to_string())
}
-
- /// Whether the regex matches the given `text`.
- pub fn matches(&self, text: &str) -> bool {
- self.0.is_match(text)
- }
}
impl Deref for Regex {