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.
Ascii.is_alphabetic()
1 parent e8c821f commit 218d7a8Copy full SHA for 218d7a8
src/ascii.rs
@@ -198,8 +198,8 @@ impl Ascii {
198
/// Check if the character is a letter (a-z, A-Z)
199
#[inline]
200
pub fn is_alphabetic(&self) -> bool {
201
- (self >= &Ascii::a && self <= &Ascii::z) ||
202
- (self >= &Ascii::A && self <= &Ascii::Z)
+ let c = self.as_byte() | 0b010_0000;// Turns uppercase into lowercase.
+ c >= b'a' && c <= b'z'
203
}
204
205
/// Check if the character is a number (0-9)
0 commit comments