Skip to content

Commit

Permalink
Create the ascii whitespace cset
Browse files Browse the repository at this point in the history
  • Loading branch information
botahamec committed Aug 3, 2023
1 parent 144e080 commit 392a88d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/csets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,16 @@ impl CharacterSet for AsciiDigits {
}
}

/// Contains the ASCII whitespace characters
#[derive(Debug, Clone, Copy)]
pub struct AsciiWhitespace;

impl CharacterSet for AsciiWhitespace {
fn contains(&self, ch: char) -> bool {
ch.is_ascii_whitespace()
}
}

/// Contains all lowercase ASCII letters, a-z
#[derive(Debug, Clone, Copy)]
pub struct AsciiLowercase;
Expand Down

0 comments on commit 392a88d

Please sign in to comment.