Str::slice_chars() is O(end), not O(end - begin)
This commit is contained in:
parent
87a31f6f0f
commit
c92cdad3dd
1 changed files with 2 additions and 2 deletions
|
|
@ -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.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue