Skip to content

Commit

Permalink
TRPL: minor correction on how chars().nth() work
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vincentbernat committed Aug 8, 2015
1 parent cbf4c34 commit b67adbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doc/trpl/strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b67adbe

Please sign in to comment.