From 33ae62c3d7c5a619595e9faced2450dae27ad702 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Wed, 9 Dec 2020 13:17:54 -0500 Subject: [PATCH] Clarify that String::split_at takes a byte index. --- library/alloc/src/string.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index ce216e5336eb8..27b32b6950267 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -1413,7 +1413,7 @@ impl String { self.len() == 0 } - /// Splits the string into two at the given index. + /// Splits the string into two at the given byte index. /// /// Returns a newly allocated `String`. `self` contains bytes `[0, at)`, and /// the returned `String` contains bytes `[at, len)`. `at` must be on the