From b67adbed5a3bb9820aeee8eef6d82ad20e028355 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sun, 9 Aug 2015 00:56:38 +0200 Subject: [PATCH] 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. --- src/doc/trpl/strings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/trpl/strings.md b/src/doc/trpl/strings.md index 7d5c43ea14c03..aa1944a099335 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