std::str: fix .slice_chars example. Fixes #11014.

This commit is contained in:
Huon Wilson 2013-12-19 17:36:44 +11:00
parent b6933f8d8b
commit cacf58caff

View File

@ -1681,7 +1681,7 @@ pub trait StrSlice<'a> {
/// ```rust
/// let s = "Löwe 老虎 Léopard";
/// assert_eq!(s.slice_chars(0, 4), "Löwe");
/// assert_eq!(s.slice_chars(6, 8), "老虎");
/// assert_eq!(s.slice_chars(5, 7), "老虎");
/// ```
fn slice_chars(&self, begin: uint, end: uint) -> &'a str;