Specify that split_ascii_whitespace uses the same definition as is_ascii_whitespace
This commit is contained in:
parent
bc7512ee63
commit
9a0c85655c
1 changed files with 3 additions and 1 deletions
|
|
@ -1172,6 +1172,7 @@ impl str {
|
|||
/// The iterator returned will return string slices that are sub-slices of
|
||||
/// the original string slice, separated by any amount of ASCII whitespace.
|
||||
///
|
||||
/// This uses the same definition as [`char::is_ascii_whitespace`].
|
||||
/// To split by Unicode `Whitespace` instead, use [`split_whitespace`].
|
||||
///
|
||||
/// [`split_whitespace`]: str::split_whitespace
|
||||
|
|
@ -1190,7 +1191,8 @@ impl str {
|
|||
/// assert_eq!(None, iter.next());
|
||||
/// ```
|
||||
///
|
||||
/// All kinds of ASCII whitespace are considered:
|
||||
/// Various kinds of ASCII whitespace are considered
|
||||
/// (see [`char::is_ascii_whitespace`]):
|
||||
///
|
||||
/// ```
|
||||
/// let mut iter = " Mary had\ta little \n\t lamb".split_ascii_whitespace();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue