diff --git a/library/core/src/ascii/ascii_char.rs b/library/core/src/ascii/ascii_char.rs index ec3e551056fe..a957005972a2 100644 --- a/library/core/src/ascii/ascii_char.rs +++ b/library/core/src/ascii/ascii_char.rs @@ -949,7 +949,8 @@ pub const fn is_hexdigit(self) -> bool { self.to_u8().is_ascii_hexdigit() } - /// Checks if the value is a punctuation character: + /// Checks if the value is a punctuation or symbol character + /// (i.e. not alphanumeric, whitespace, or control): /// /// - 0x21 ..= 0x2F `! " # $ % & ' ( ) * + , - . /`, or /// - 0x3A ..= 0x40 `: ; < = > ? @`, or @@ -989,7 +990,8 @@ pub const fn is_punctuation(self) -> bool { self.to_u8().is_ascii_punctuation() } - /// Checks if the value is a graphic character: + /// Checks if the value is a graphic character + /// (i.e. not whitespace or control): /// 0x21 '!' ..= 0x7E '~'. /// /// # Examples diff --git a/library/core/src/char/methods.rs b/library/core/src/char/methods.rs index 00b735e91a37..cdf3deb0d83c 100644 --- a/library/core/src/char/methods.rs +++ b/library/core/src/char/methods.rs @@ -1984,7 +1984,8 @@ pub const fn is_ascii_hexdigit(&self) -> bool { matches!(*self, '0'..='9') | matches!(*self, 'A'..='F') | matches!(*self, 'a'..='f') } - /// Checks if the value is an ASCII punctuation character: + /// Checks if the value is an ASCII punctuation or symbol character + /// (i.e. not alphanumeric, whitespace, or control): /// /// - U+0021 ..= U+002F `! " # $ % & ' ( ) * + , - . /`, or /// - U+003A ..= U+0040 `: ; < = > ? @`, or @@ -2025,7 +2026,8 @@ pub const fn is_ascii_punctuation(&self) -> bool { | matches!(*self, '{'..='~') } - /// Checks if the value is an ASCII graphic character: + /// Checks if the value is an ASCII graphic character + /// (i.e. not whitespace or control): /// U+0021 '!' ..= U+007E '~'. /// /// # Examples diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs index e305cff31189..890f5ab2286c 100644 --- a/library/core/src/num/mod.rs +++ b/library/core/src/num/mod.rs @@ -986,7 +986,8 @@ pub const fn is_ascii_hexdigit(&self) -> bool { matches!(*self, b'0'..=b'9') | matches!(*self, b'A'..=b'F') | matches!(*self, b'a'..=b'f') } - /// Checks if the value is an ASCII punctuation character: + /// Checks if the value is an ASCII punctuation or symbol character + /// (i.e. not alphanumeric, whitespace, or control): /// /// - U+0021 ..= U+002F `! " # $ % & ' ( ) * + , - . /`, or /// - U+003A ..= U+0040 `: ; < = > ? @`, or @@ -1027,7 +1028,8 @@ pub const fn is_ascii_punctuation(&self) -> bool { | matches!(*self, b'{'..=b'~') } - /// Checks if the value is an ASCII graphic character: + /// Checks if the value is an ASCII graphic character + /// (i.e. not whitespace or control): /// U+0021 '!' ..= U+007E '~'. /// /// # Examples