You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 49cd331
Browse filesBrowse the repository at this point in the historyBrowse files
Rollup merge of #160595 - AbeZbm:clarify_str_split_doc, r=clarfonthey
Clarify `str::split_at` docs
Fixes#158990
The documentation currently describes the split position as an "index", which can be confusing because `mid` is a byte offset rather than an element index.
This change clarifies the relationship between `mid` and the returned slices by describing the length of the first slice. The first returned slice contains exactly `mid` bytes from the start of the string slice, and the second slice contains the remaining bytes.
0 commit comments