about summary refs log tree commit diff
path: root/library/core/src/str/mod.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon@apollographql.com>2025-05-12 18:43:00 +0200
committerSimon Sapin <simon@apollographql.com>2025-05-12 18:43:00 +0200
commit9a0c85655c7b60c5b6f595e98f72275e8052058b (patch)
treece9a53a8f59a33c472850e3f109b06b6fed40033 /library/core/src/str/mod.rs
parentbc7512ee6309ee7e8cacf87b94aa6d1f550c9d99 (diff)
downloadrust-9a0c85655c7b60c5b6f595e98f72275e8052058b.tar.gz
rust-9a0c85655c7b60c5b6f595e98f72275e8052058b.zip
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 dafabba645c..0123e52f547 100644
--- a/library/core/src/str/mod.rs
+++ b/library/core/src/str/mod.rs
@@ -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();