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:
parent
b7974bd3cd
commit
4549c777e6
@ -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`.
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user