Clarify that String::split_at takes a byte index.
This commit is contained in:
parent
fa55f668e5
commit
33ae62c3d7
@ -1413,7 +1413,7 @@ pub fn is_empty(&self) -> bool {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user