diff options
| author | Vincent Bernat <vincent@bernat.im> | 2015-08-09 00:56:38 +0200 |
|---|---|---|
| committer | Vincent Bernat <vincent@bernat.im> | 2015-08-09 00:56:38 +0200 |
| commit | b67adbed5a3bb9820aeee8eef6d82ad20e028355 (patch) | |
| tree | f44a0503876c6c8ff0e368020cd281b2dcf62019 | |
| parent | cbf4c342cf9facb660df181c9c1d7d9a8934d5a1 (diff) | |
| download | rust-b67adbed5a3bb9820aeee8eef6d82ad20e028355.tar.gz rust-b67adbed5a3bb9820aeee8eef6d82ad20e028355.zip | |
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.
| -rw-r--r-- | src/doc/trpl/strings.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/trpl/strings.md b/src/doc/trpl/strings.md index 7d5c43ea14c..aa1944a0993 100644 --- a/src/doc/trpl/strings.md +++ b/src/doc/trpl/strings.md @@ -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 |
