Skip to content

Commit 82715e1

Browse files
authored
Rollup merge of rust-lang#140952 - SimonSapin:ascii_whitespace_definition, r=dtolnay
Specify that split_ascii_whitespace uses the same definition as is_ascii_whitespace
2 parents 7b2da84 + b719a60 commit 82715e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/str/mod.rs

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

0 commit comments

Comments
 (0)