summaryrefslogtreecommitdiff
path: root/src/input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/input.rs')
-rw-r--r--src/input.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/input.rs b/src/input.rs
index 0b38556..e924580 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -99,6 +99,32 @@ impl Character for char {
}
}
+impl Character for u8 {
+ fn is_ascii(&self) -> bool {
+ (*self).is_ascii()
+ }
+
+ fn is_alphabetic(&self) -> bool {
+ (*self).is_ascii_alphabetic()
+ }
+
+ fn is_ascii_alphabetic(&self) -> bool {
+ (*self).is_ascii_alphabetic()
+ }
+
+ fn is_numeric(&self) -> bool {
+ (*self).is_ascii_digit()
+ }
+
+ fn is_whitespace(&self) -> bool {
+ (*self).is_ascii_whitespace()
+ }
+
+ fn is_ascii_whitespace(&self) -> bool {
+ (*self).is_ascii_whitespace()
+ }
+}
+
#[derive(Clone)]
pub struct InputIter<I: Input> {
pub it: I::Items,