From 4549c777e690c69552dea2f2ea04c56074430546 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 12 Oct 2020 12:40:12 +0100 Subject: [PATCH] docs: Rewrap `str::strip_prefix` and `strip_suffix` back to 100 Requested-by: @LukasKalbertodt Signed-off-by: Ian Jackson --- library/core/src/str/mod.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs index e6c37b6ba59..a76c8997a10 100644 --- a/library/core/src/str/mod.rs +++ b/library/core/src/str/mod.rs @@ -1964,10 +1964,8 @@ impl str { /// Returns a string slice with the prefix removed. /// - /// If the string starts with the pattern `prefix`, returns - /// substring after the prefix, wrapped in `Some`. - /// Unlike `trim_start_matches`, this method removes the - /// prefix exactly once. + /// If the string starts with the pattern `prefix`, returns substring after the prefix, wrapped + /// in `Some`. Unlike `trim_start_matches`, this method removes the prefix exactly once. /// /// If the string does not start with `prefix`, returns `None`. /// @@ -1993,10 +1991,8 @@ impl str { /// Returns a string slice with the suffix removed. /// - /// If the string ends with the pattern `suffix`, returns the - /// substring before the suffix, wrapped in `Some`. - /// Unlike `trim_end_matches`, this method removes the - /// suffix exactly once. + /// If the string ends with the pattern `suffix`, returns the substring before the suffix, + /// wrapped in `Some`. Unlike `trim_end_matches`, this method removes the suffix exactly once. /// /// If the string does not end with `suffix`, returns `None`. ///