docs: std::string::String.repeat(): slightly rephrase to be more in-line with other descriptions.
add ticks around a few keywords in other descriptions.
This commit is contained in:
@@ -513,7 +513,7 @@ impl str {
|
|||||||
unsafe { String::from_utf8_unchecked(slice.into_vec()) }
|
unsafe { String::from_utf8_unchecked(slice.into_vec()) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a [`String`] by repeating a string `n` times.
|
/// Creates a new [`String`] by repeating a string `n` times.
|
||||||
///
|
///
|
||||||
/// [`String`]: string/struct.String.html
|
/// [`String`]: string/struct.String.html
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -752,7 +752,7 @@ impl String {
|
|||||||
self.vec
|
self.vec
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Extracts a string slice containing the entire string.
|
/// Extracts a string slice containing the entire `String`.
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
@@ -1454,8 +1454,8 @@ impl String {
|
|||||||
self.vec.clear()
|
self.vec.clear()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a draining iterator that removes the specified range in the string
|
/// Creates a draining iterator that removes the specified range in the `String`
|
||||||
/// and yields the removed chars.
|
/// and yields the removed `chars`.
|
||||||
///
|
///
|
||||||
/// Note: The element range is removed even if the iterator is not
|
/// Note: The element range is removed even if the iterator is not
|
||||||
/// consumed until the end.
|
/// consumed until the end.
|
||||||
|
|||||||
Reference in New Issue
Block a user