summaryrefslogtreecommitdiff
path: root/src/csets.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/csets.rs')
-rw-r--r--src/csets.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/csets.rs b/src/csets.rs
index ee4cdcb..3ee5e53 100644
--- a/src/csets.rs
+++ b/src/csets.rs
@@ -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;