TRPL: minor correction on how chars().nth() work
The previous wording was confusing. While would we need to go through the whole list just to find the first code point? `chars()` being an iterator, we only need to walk from the beginning of the list.
This commit is contained in:
parent
cbf4c342cf
commit
b67adbed5a
1 changed files with 1 additions and 1 deletions
|
|
@ -115,7 +115,7 @@ You can get something similar to an index like this:
|
|||
let dog = hachiko.chars().nth(1); // kinda like hachiko[1]
|
||||
```
|
||||
|
||||
This emphasizes that we have to go through the whole list of `chars`.
|
||||
This emphasizes that we have to walk from the beginning of the list of `chars`.
|
||||
|
||||
## Slicing
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue