@@ -1832,14 +1832,14 @@ impl str {
18321832 /// Returns a string slice with leading and trailing whitespace removed.
18331833 ///
18341834 /// 'Whitespace' is defined according to the terms of the Unicode Derived
1835- /// Core Property `White_Space`.
1835+ /// Core Property `White_Space`, which includes newlines .
18361836 ///
18371837 /// # Examples
18381838 ///
18391839 /// Basic usage:
18401840 ///
18411841 /// ```
1842- /// let s = " Hello\tworld\t";
1842+ /// let s = "\n Hello\tworld\t\n ";
18431843 ///
18441844 /// assert_eq!("Hello\tworld", s.trim());
18451845 /// ```
@@ -1855,7 +1855,7 @@ impl str {
18551855 /// Returns a string slice with leading whitespace removed.
18561856 ///
18571857 /// 'Whitespace' is defined according to the terms of the Unicode Derived
1858- /// Core Property `White_Space`.
1858+ /// Core Property `White_Space`, which includes newlines .
18591859 ///
18601860 /// # Text directionality
18611861 ///
@@ -1869,8 +1869,8 @@ impl str {
18691869 /// Basic usage:
18701870 ///
18711871 /// ```
1872- /// let s = " Hello\tworld\t";
1873- /// assert_eq!("Hello\tworld\t", s.trim_start());
1872+ /// let s = "\n Hello\tworld\t\n ";
1873+ /// assert_eq!("Hello\tworld\t\n ", s.trim_start());
18741874 /// ```
18751875 ///
18761876 /// Directionality:
@@ -1894,7 +1894,7 @@ impl str {
18941894 /// Returns a string slice with trailing whitespace removed.
18951895 ///
18961896 /// 'Whitespace' is defined according to the terms of the Unicode Derived
1897- /// Core Property `White_Space`.
1897+ /// Core Property `White_Space`, which includes newlines .
18981898 ///
18991899 /// # Text directionality
19001900 ///
@@ -1908,8 +1908,8 @@ impl str {
19081908 /// Basic usage:
19091909 ///
19101910 /// ```
1911- /// let s = " Hello\tworld\t";
1912- /// assert_eq!(" Hello\tworld", s.trim_end());
1911+ /// let s = "\n Hello\tworld\t\n ";
1912+ /// assert_eq!("\n Hello\tworld", s.trim_end());
19131913 /// ```
19141914 ///
19151915 /// Directionality:
0 commit comments