docs: Rewrap str::strip_prefix and strip_suffix back to 100

Requested-by: @LukasKalbertodt
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
This commit is contained in:
Ian Jackson 2020-10-12 12:40:12 +01:00
parent b7974bd3cd
commit 4549c777e6

View File

@ -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`.
///