We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18687a9 commit 7b96f13Copy full SHA for 7b96f13
src/libstd/ascii.rs
@@ -67,7 +67,7 @@ impl Ascii {
67
/// Check if the character is a number (0-9)
68
#[inline]
69
pub fn is_digit(&self) -> bool {
70
- self.chr >= 0x31 && self.chr <= 0x39
+ self.chr >= 0x30 && self.chr <= 0x39
71
}
72
73
/// Check if the character is a letter or number
@@ -85,7 +85,7 @@ impl Ascii {
85
/// Check if the character is a control character
86
87
pub fn is_control(&self) -> bool {
88
- self.chr <= 0x20 || self.chr == 0x7F
+ self.chr < 0x20 || self.chr == 0x7F
89
90
91
/// Checks if the character is printable (except space)
0 commit comments