Skip to content

Commit 4549c77

Browse files
committed
docs: Rewrap str::strip_prefix and strip_suffix back to 100
Requested-by: @LukasKalbertodt Signed-off-by: Ian Jackson <[email protected]>
1 parent b7974bd commit 4549c77

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

library/core/src/str/mod.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,10 +1964,8 @@ impl str {
19641964

19651965
/// Returns a string slice with the prefix removed.
19661966
///
1967-
/// If the string starts with the pattern `prefix`, returns
1968-
/// substring after the prefix, wrapped in `Some`.
1969-
/// Unlike `trim_start_matches`, this method removes the
1970-
/// prefix exactly once.
1967+
/// If the string starts with the pattern `prefix`, returns substring after the prefix, wrapped
1968+
/// in `Some`. Unlike `trim_start_matches`, this method removes the prefix exactly once.
19711969
///
19721970
/// If the string does not start with `prefix`, returns `None`.
19731971
///
@@ -1993,10 +1991,8 @@ impl str {
19931991

19941992
/// Returns a string slice with the suffix removed.
19951993
///
1996-
/// If the string ends with the pattern `suffix`, returns the
1997-
/// substring before the suffix, wrapped in `Some`.
1998-
/// Unlike `trim_end_matches`, this method removes the
1999-
/// suffix exactly once.
1994+
/// If the string ends with the pattern `suffix`, returns the substring before the suffix,
1995+
/// wrapped in `Some`. Unlike `trim_end_matches`, this method removes the suffix exactly once.
20001996
///
20011997
/// If the string does not end with `suffix`, returns `None`.
20021998
///

0 commit comments

Comments
 (0)