Skip to content

Commit 33ae62c

Browse files
authored
Clarify that String::split_at takes a byte index.
1 parent fa55f66 commit 33ae62c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/alloc/src/string.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,7 @@ impl String {
14131413
self.len() == 0
14141414
}
14151415

1416-
/// Splits the string into two at the given index.
1416+
/// Splits the string into two at the given byte index.
14171417
///
14181418
/// Returns a newly allocated `String`. `self` contains bytes `[0, at)`, and
14191419
/// the returned `String` contains bytes `[at, len)`. `at` must be on the

0 commit comments

Comments
 (0)