summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBotahamec <botahamec@outlook.com>2023-08-02 22:09:09 -0400
committerBotahamec <botahamec@outlook.com>2023-08-02 22:09:09 -0400
commit392a88dd422431829d9146b41cd6e2dd51060833 (patch)
tree67057f508302045d580a0d66e98e7458384c0099 /src
parent144e080d03fb7bb2e2958dab90a10f36673f1491 (diff)
Create the ascii whitespace cset
Diffstat (limited to 'src')
-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;