Skip to content

Commit

Permalink
Clarify that String::split_at takes a byte index.
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv authored Dec 9, 2020
1 parent fa55f66 commit 33ae62c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/alloc/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 33ae62c

Please sign in to comment.