Skip to content

Commit 9a0c856

Browse files
committed
Specify that split_ascii_whitespace uses the same definition as is_ascii_whitespace
1 parent bc7512e commit 9a0c856

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

library/core/src/str/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,7 @@ impl str {
11721172
/// The iterator returned will return string slices that are sub-slices of
11731173
/// the original string slice, separated by any amount of ASCII whitespace.
11741174
///
1175+
/// This uses the same definition as [`char::is_ascii_whitespace`].
11751176
/// To split by Unicode `Whitespace` instead, use [`split_whitespace`].
11761177
///
11771178
/// [`split_whitespace`]: str::split_whitespace
@@ -1190,7 +1191,8 @@ impl str {
11901191
/// assert_eq!(None, iter.next());
11911192
/// ```
11921193
///
1193-
/// All kinds of ASCII whitespace are considered:
1194+
/// Various kinds of ASCII whitespace are considered
1195+
/// (see [`char::is_ascii_whitespace`]):
11941196
///
11951197
/// ```
11961198
/// let mut iter = " Mary had\ta little \n\t lamb".split_ascii_whitespace();

0 commit comments

Comments
 (0)