Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions library/core/src/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -823,13 +823,13 @@ impl str {
unsafe { &mut *(begin..end).get_unchecked_mut(self) }
}

/// Divides one string slice into two at an index.
/// Divides one string slice into two at a byte offset.
///
/// The argument, `mid`, should be a byte offset from the start of the
/// string. It must also be on the boundary of a UTF-8 code point.
///
/// The two slices returned go from the start of the string slice to `mid`,
/// and from `mid` to the end of the string slice.
/// The first returned slice contains exactly the first `mid` bytes, and the
/// second contains all remaining bytes.
///
/// To get mutable string slices instead, see the [`split_at_mut`]
/// method.
Expand Down Expand Up @@ -863,13 +863,13 @@ impl str {
}
}

/// Divides one mutable string slice into two at an index.
/// Divides one mutable string slice into two at a byte offset.
///
/// The argument, `mid`, should be a byte offset from the start of the
/// string. It must also be on the boundary of a UTF-8 code point.
///
/// The two slices returned go from the start of the string slice to `mid`,
/// and from `mid` to the end of the string slice.
/// The first returned slice contains exactly the first `mid` bytes, and the
/// second contains all remaining bytes.
///
/// To get immutable string slices instead, see the [`split_at`] method.
///
Expand Down Expand Up @@ -907,14 +907,14 @@ impl str {
}
}

/// Divides one string slice into two at an index.
/// Divides one string slice into two at a byte offset.
///
/// The argument, `mid`, should be a valid byte offset from the start of the
/// string. It must also be on the boundary of a UTF-8 code point. The
/// method returns `None` if that’s not the case.
///
/// The two slices returned go from the start of the string slice to `mid`,
/// and from `mid` to the end of the string slice.
/// The first returned slice contains exactly the first `mid` bytes, and the
/// second contains all remaining bytes.
///
/// To get mutable string slices instead, see the [`split_at_mut_checked`]
/// method.
Expand Down Expand Up @@ -947,14 +947,14 @@ impl str {
}
}

/// Divides one mutable string slice into two at an index.
/// Divides one mutable string slice into two at a byte offset.
///
/// The argument, `mid`, should be a valid byte offset from the start of the
/// string. It must also be on the boundary of a UTF-8 code point. The
/// method returns `None` if that’s not the case.
///
/// The two slices returned go from the start of the string slice to `mid`,
/// and from `mid` to the end of the string slice.
/// The first returned slice contains exactly the first `mid` bytes, and the
/// second contains all remaining bytes.
///
/// To get immutable string slices instead, see the [`split_at_checked`] method.
///
Expand Down Expand Up @@ -988,7 +988,7 @@ impl str {
}
}

/// Divides one string slice into two at an index.
/// Divides one string slice into two at a byte offset.
///
/// # Safety
///
Expand All @@ -1007,7 +1007,7 @@ impl str {
}
}

/// Divides one string slice into two at an index.
/// Divides one mutable string slice into two at a byte offset.
///
/// # Safety
///
Expand Down
Loading