]> git.lizzy.rs Git - rust.git/commitdiff
Str::slice_chars() is O(end), not O(end - begin)
authorSimon Sapin <simon.sapin@exyr.org>
Wed, 5 Mar 2014 09:41:35 +0000 (09:41 +0000)
committerSimon Sapin <simon.sapin@exyr.org>
Wed, 5 Mar 2014 09:41:35 +0000 (09:41 +0000)
src/libstd/str.rs

index ef9be6ee70c40422f57ebe853608383da5d0b087..20aaafbe677e517c0233efa5bce02d71245f45d2 100644 (file)
@@ -1997,8 +1997,8 @@ pub trait StrSlice<'a> {
     /// handle edge cases such as leaving a combining character as the
     /// first code point of the string.
     ///
-    /// Due to the design of UTF-8, this operation is `O(end -
-    /// begin)`. See `slice`, `slice_to` and `slice_from` for `O(1)`
+    /// Due to the design of UTF-8, this operation is `O(end)`.
+    /// See `slice`, `slice_to` and `slice_from` for `O(1)`
     /// variants that use byte indices rather than code point
     /// indices.
     ///