docs: Rewrap slice::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
4549c777e6
commit
6f5e96fb5f
@ -1703,8 +1703,7 @@ pub fn ends_with(&self, needle: &[T]) -> bool
|
||||
|
||||
/// Returns a subslice with the prefix removed.
|
||||
///
|
||||
/// If the slice starts with `prefix`, returns
|
||||
/// the subslice after the prefix, wrapped in `Some`.
|
||||
/// If the slice starts with `prefix`, returns the subslice after the prefix, wrapped in `Some`.
|
||||
///
|
||||
/// If the slice does not start with `prefix`, returns `None`.
|
||||
///
|
||||
@ -1738,8 +1737,7 @@ pub fn strip_prefix(&self, prefix: &[T]) -> Option<&[T]>
|
||||
|
||||
/// Returns a subslice with the suffix removed.
|
||||
///
|
||||
/// If the slice ends with `suffix`, returns
|
||||
/// the subslice before the suffix, wrapped in `Some`.
|
||||
/// If the slice ends with `suffix`, returns the subslice before the suffix, wrapped in `Some`.
|
||||
///
|
||||
/// If the slice does not end with `suffix`, returns `None`.
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user