Closed
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.