doc.rust-lang.org
pub const fn len_utf16(self) -> usize
Returns the number of 16-bit code units this char would need if encoded in UTF-16.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_whitespace(self) -> bool
Returns true if this char has the White_Space property.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_uppercase(self) -> bool
Returns true if this char has the Uppercase property.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn is_numeric(self) -> bool
Returns true if this char has one of the general categories for numbers.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_lowercase(self) -> bool
Returns true if this char has the Lowercase property.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_digit(self, radix: u32) -> bool
Checks if a char is a digit in the given radix.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_control(self) -> bool
Returns true if this char has the general category for control codes.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ascii_whitespace(&self) -> bool
Checks if the value is an ASCII whitespace character: U+0020 SPACE, U+0009 HORIZONTAL TAB, U+000A LINE FEED, U+000C FORM FEED, or U+000D CARRIAGE RETURN.
method
core
Stable since 1.24.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ascii_uppercase(&self) -> bool
Checks if the value is an ASCII uppercase character: U+0041 'A' ..= U+005A 'Z'.
method
core
Stable since 1.24.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ascii_punctuation(&self) -> bool
Checks if the value is an ASCII punctuation or symbol character (i.e. not alphanumeric, whitespace, or control):
method
core
Stable since 1.24.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ascii_lowercase(&self) -> bool
Checks if the value is an ASCII lowercase character: U+0061 'a' ..= U+007A 'z'.
method
core
Stable since 1.24.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ascii_hexdigit(&self) -> bool
Checks if the value is an ASCII hexadecimal digit:
method
core
Stable since 1.24.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ascii_graphic(&self) -> bool
Checks if the value is an ASCII graphic character (i.e. not whitespace or control): U+0021 '!' ..= U+007E '~'.
method
core
Stable since 1.24.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ascii_digit(&self) -> bool
Checks if the value is an ASCII decimal digit: U+0030 '0' ..= U+0039 '9'.
method
core
Stable since 1.24.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ascii_control(&self) -> bool
Checks if the value is an ASCII control character: U+0000 NUL ..= U+001F UNIT SEPARATOR, or U+007F DELETE. Note that most ASCII whitespace characters are control characters, but SPACE is not.
method
core
Stable since 1.24.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ascii_alphanumeric(&self) -> bool
Checks if the value is an ASCII alphanumeric character:
method
core
Stable since 1.24.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ascii_alphabetic(&self) -> bool
Checks if the value is an ASCII alphabetic character:
method
core
Stable since 1.24.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ascii(&self) -> bool
Checks if the value is within the ASCII range.
method
core
Stable since 1.23.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn is_alphanumeric(self) -> bool
Returns true if this char satisfies either is_alphabetic() or is_numeric().
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn is_alphabetic(self) -> bool
Returns true if this char has the Alphabetic property.
method
core
Stable since 1.0.0
Version 1.100.0-nightly