Skip to content

Commit

Permalink
Rollup merge of rust-lang#27611 - vincentbernat:fix/doc/chars-iterato…
Browse files Browse the repository at this point in the history
…r, r=steveklabnik

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.

Note that I am not a native English speaker and I have still difficulties to spot if a "the" is needed somewhere. Feel free to take this PR as a mere suggestion.

r? @steveklabnik
  • Loading branch information
Manishearth committed Aug 11, 2015
2 parents be2d4fb + b67adbe commit a917f61
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 a917f61

Please sign in to comment.