From 221c117353b39011060295dfe07f66f2271b19a6 Mon Sep 17 00:00:00 2001 From: Ophir LOJKINE Date: Mon, 5 Oct 2020 18:16:59 +0200 Subject: [PATCH] doc: clarify docs for is_match This makes it a bit clearer that `is_match` does not require the match to span the entire string, but rather, that a match may occur anywhere in the string. Closes #711 --- src/re_bytes.rs | 3 ++- src/re_unicode.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/re_bytes.rs b/src/re_bytes.rs index 189bed5fd5..ca01e0ec98 100644 --- a/src/re_bytes.rs +++ b/src/re_bytes.rs @@ -119,7 +119,8 @@ impl Regex { RegexBuilder::new(re).build() } - /// Returns true if and only if the regex matches the string given. + /// Returns true if and only if there is a match for the regex in the + /// string given. /// /// It is recommended to use this method if all you need to do is test /// a match, since the underlying matching engine may be able to do less diff --git a/src/re_unicode.rs b/src/re_unicode.rs index 7a0e34951b..ea95c1b6df 100644 --- a/src/re_unicode.rs +++ b/src/re_unicode.rs @@ -175,7 +175,8 @@ impl Regex { RegexBuilder::new(re).build() } - /// Returns true if and only if the regex matches the string given. + /// Returns true if and only if there is a match for the regex in the + /// string given. /// /// It is recommended to use this method if all you need to do is test /// a match, since the underlying matching engine may be able to do less