summary refs log tree commit diff
path: root/library/alloc/src/string.rs
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2020-12-09 13:17:54 -0500
committerGitHub <noreply@github.com>2020-12-09 13:17:54 -0500
commit33ae62c3d7c5a619595e9faced2450dae27ad702 (patch)
tree362cdf2ec579a49646bc3b8d4591553651a4ea46 /library/alloc/src/string.rs
parentfa55f668e5ea5388ec98b9340969527252239151 (diff)
downloadrust-33ae62c3d7c5a619595e9faced2450dae27ad702.tar.gz
rust-33ae62c3d7c5a619595e9faced2450dae27ad702.zip
Clarify that String::split_at takes a byte index.
Diffstat (limited to 'library/alloc/src/string.rs')
-rw-r--r--library/alloc/src/string.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs
index ce216e5336e..27b32b69502 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