diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2013-12-19 17:36:44 +1100 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2013-12-19 17:36:44 +1100 |
| commit | cacf58caff54cd8c31886aa9ffdd54672085129f (patch) | |
| tree | d239a296d2c5ac280daec2179e01788541ad8dd1 /src/libstd | |
| parent | b6933f8d8b86f78ac7b5f70f0781d794144763a0 (diff) | |
| download | rust-cacf58caff54cd8c31886aa9ffdd54672085129f.tar.gz rust-cacf58caff54cd8c31886aa9ffdd54672085129f.zip | |
std::str: fix .slice_chars example. Fixes #11014.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/str.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/str.rs b/src/libstd/str.rs index f1310765130..8a86df9d233 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -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; |
