-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.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.
Description
As discussed at https://internals.rust-lang.org/t/improvements-to-asciiext/4689 I have added is_ascii_*
equivalents of most (not quite all) of C's ctype.h
's isxxx
functions to the AsciiExt trait.
The new functions are
is_ascii_alphabetic
is_ascii_uppercase
is_ascii_lowercase
is_ascii_alphanumeric
is_ascii_digit
is_ascii_hexdigit
is_ascii_punctuation
is_ascii_graphic
is_ascii_whitespace
(matches the Infra Standard definition of ASCII whitespace, not POSIX)is_ascii_control
They are implemented for char
, u8
, str
, and [u8]
, and, for backward compatibility with external trait implementations, have default implementations that call unimplemented!()
.
PR to follow, but I needed to file this bug in order to get an issue number to put in the stability annotations.
richard-uk1, thinkier, alex, behnam and LifeIsStrangeSamWhited, fitzgen, BrianOn99, thinkier, austinhartzheim and 3 more
Metadata
Metadata
Assignees
Labels
B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.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.