From b836cf6fb8d30466c057e475397706e827c1d655 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 19 May 2022 15:26:34 -0700 Subject: [PATCH] Say "last" instead of "rightmost" in the documentation for `std::str::rfind`. In the documentation comment for `std::str::rfind`, say "last" instead of "rightmost" to describe the match that `rfind` finds. This follows the spirit of #30459, for which `trim_left` and `trim_right` were replaced by `trim_start` and `trim_end` to be more clear about how they work on text which is displayed right-to-left. --- library/core/src/str/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs index ede9a28dcbe7c..5223c43acc256 100644 --- a/library/core/src/str/mod.rs +++ b/library/core/src/str/mod.rs @@ -1158,7 +1158,7 @@ impl str { pat.into_searcher(self).next_match().map(|(i, _)| i) } - /// Returns the byte index for the first character of the rightmost match of the pattern in + /// Returns the byte index for the first character of the last match of the pattern in /// this string slice. /// /// Returns [`None`] if the pattern doesn't match.