about summary refs log tree commit diff
path: root/library/core/src/str/mod.rs
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-05-26 03:38:17 +0200
committerGitHub <noreply@github.com>2025-05-26 03:38:17 +0200
commit8624f9c62f012f253c49da4c33a5445cd8611643 (patch)
treebc4c6a89ea4db47342b6564ec06934211e34625d /library/core/src/str/mod.rs
parent9aae60befc0ebafa21233827d7046187a0396a3d (diff)
parent9a0c85655c7b60c5b6f595e98f72275e8052058b (diff)
downloadrust-8624f9c62f012f253c49da4c33a5445cd8611643.tar.gz
rust-8624f9c62f012f253c49da4c33a5445cd8611643.zip
Rollup merge of #140952 - SimonSapin:ascii_whitespace_definition, r=dtolnay
Specify that split_ascii_whitespace uses the same definition as is_ascii_whitespace
Diffstat (limited to 'library/core/src/str/mod.rs')
-rw-r--r--library/core/src/str/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs
index e505e228095..06161cb6c7c 100644
--- a/library/core/src/str/mod.rs
+++ b/library/core/src/str/mod.rs
@@ -1173,6 +1173,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
@@ -1191,7 +1192,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();