Skip to content

Tracking Issue for const str::split_at* #131518

Closed
@zachs18

Description

@zachs18

Feature gate: #![feature(const_str_split_at)]

This is a tracking issue for using str::split_at, str::split_at_mut, str::split_at_checked, str::split_at_mut_checked in const, which allows dividing one (mutable) string slice into two (fallibly) at an index during const-eval.

Public API

// core::str
impl str {
    pub const fn split_at(&self, mid: usize) -> (&str, &str);
    pub const fn split_at_mut(&mut self, mid: usize) -> (&mut str, &mut str);
    pub const fn split_at_checked(&self, mid: usize) -> Option<(&str, &str)>;
    pub const fn split_at_mut_checked(&mut self, mid: usize) -> Option<(&mut str, &mut str)>;
}

Steps / History

Unresolved Questions

  • None yet.

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: 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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions