Skip to content

Tracking Issue for titlecase handling in core::char #153892

@Jules-Bertholet

Description

@Jules-Bertholet

Feature gate: #![feature(titlecase)]

This is a tracking issue for library functions to handle title-casing of Unicode characters.

Public API

// core

impl char {
    pub fn is_cased(self) -> bool;
    pub fn case(self) -> Option<CharCase>;
    pub fn is_titlecase(self) -> bool;
    pub fn to_titlecase(self) -> ToTitlecase;
}

mod char {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
    pub enum CharCase {
        Lower = 0b00,
        Title = 0b10,
        Upper = 0b11,
    }

    struct ToTitlecase { ... }
    impl Iterator for ToTitlecase { ... }
    impl DoubleEndedIterator for ToTitlecase { ... }
    impl FusedIterator for ToTitlecase { }
    impl ExactSizeIterator for ToTitlecase { ... }
    impl fmt::Display for ToTitlecase { ... }
}

// alloc

impl str {
    fn word_to_titlecase(&self) -> String;
}

Steps / History

(Remember to update the S-tracking-* label when checking boxes.)

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 RFCS-tracking-needs-to-bakeStatus: The implementation is "complete" but it needs time to bake.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions