-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.In the final comment period and will be merged soon unless new substantive objections are raised.
Description
Feature gate: #![feature(round_char_boundary)]
This is a tracking issue for str::{floor, ceil}_char_boundary
.
Public API
impl str {
// Returns the character boundary at or immediately before `index`
const fn floor_char_boundary(&self, index: usize) -> usize;
// Returns the character boundary at or immediately after `index`
const fn ceil_char_boundary(&self, index: usize) -> usize;
}
Steps / History
- Implementation: Add {floor,ceil}_char_boundary methods to str #86497
- Don't panic in
ceil_char_boundary
: Don't panic in ceil_char_boundary #112387 - Made const: str: Mark unstable
round_char_boundary
feature functions as const #144472
- Don't panic in
- Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- Should
ceil_char_boundary
panic when indices are out of bounds? Don't panic in ceil_char_boundary #112387 updated this to returnlen
instead.
Hocuri, fd, FliegendeWurst, finnbear, h-h-h-h and 22 moreschneiderfelipe
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.In the final comment period and will be merged soon unless new substantive objections are raised.