mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 19:53:46 +00:00
std::str: fix .slice_chars example. Fixes #11014.
This commit is contained in:
parent
b6933f8d8b
commit
cacf58caff
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user