diff options
| author | Chai T. Rex <ChaiTRex@users.noreply.github.com> | 2025-07-04 23:32:58 -0400 |
|---|---|---|
| committer | Chai T. Rex <ChaiTRex@users.noreply.github.com> | 2025-08-05 15:03:11 -0400 |
| commit | d811581ba7b8f577b537d33446856eb6c6ad41fa (patch) | |
| tree | 4dd27d1a9a869737dc145bf8fb22238bcd8b42ca | |
| parent | 9a1d38047fe367c32685b07a9ac41da4675b892d (diff) | |
| download | rust-d811581ba7b8f577b537d33446856eb6c6ad41fa.tar.gz rust-d811581ba7b8f577b537d33446856eb6c6ad41fa.zip | |
Add `std::ascii::Char` `MIN` and `MAX` constants
| -rw-r--r-- | library/core/src/ascii/ascii_char.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/library/core/src/ascii/ascii_char.rs b/library/core/src/ascii/ascii_char.rs index bde4b92c271..419e4694594 100644 --- a/library/core/src/ascii/ascii_char.rs +++ b/library/core/src/ascii/ascii_char.rs @@ -445,6 +445,14 @@ pub enum AsciiChar { } impl AsciiChar { + /// The character with the lowest ASCII code. + #[unstable(feature = "ascii_char", issue = "110998")] + pub const MIN: Self = Self::Null; + + /// The character with the highest ASCII code. + #[unstable(feature = "ascii_char", issue = "110998")] + pub const MAX: Self = Self::Delete; + /// Creates an ASCII character from the byte `b`, /// or returns `None` if it's too large. #[unstable(feature = "ascii_char", issue = "110998")] |
