Skip to content

Commit 9b25cc0

Browse files
Rollup merge of #97192 - sunfishcode:sunfishcode/rightmost, r=thomcc
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.
2 parents 474e12b + b836cf6 commit 9b25cc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/str/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ impl str {
11581158
pat.into_searcher(self).next_match().map(|(i, _)| i)
11591159
}
11601160

1161-
/// Returns the byte index for the first character of the rightmost match of the pattern in
1161+
/// Returns the byte index for the first character of the last match of the pattern in
11621162
/// this string slice.
11631163
///
11641164
/// Returns [`None`] if the pattern doesn't match.

0 commit comments

Comments
 (0)