Skip to content

Commit cacf58c

Browse files
committed
std::str: fix .slice_chars example. Fixes #11014.
1 parent b6933f8 commit cacf58c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,7 @@ pub trait StrSlice<'a> {
16811681
/// ```rust
16821682
/// let s = "Löwe 老虎 Léopard";
16831683
/// assert_eq!(s.slice_chars(0, 4), "Löwe");
1684-
/// assert_eq!(s.slice_chars(6, 8), "老虎");
1684+
/// assert_eq!(s.slice_chars(5, 7), "老虎");
16851685
/// ```
16861686
fn slice_chars(&self, begin: uint, end: uint) -> &'a str;
16871687

0 commit comments

Comments
 (0)