diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -26,6 +26,7 @@ pub enum ByteCategory { #[non_exhaustive] pub enum CharacterTable { Default, + Ascii, CP437, } @@ -83,6 +84,14 @@ impl Byte { AsciiOther => '•', NonAscii => '×', }, + CharacterTable::Ascii => match self.category() { + Null => '.', + AsciiPrintable => self.0 as char, + AsciiWhitespace if self.0 == 0x20 => ' ', + AsciiWhitespace => '.', + AsciiOther => '.', + NonAscii => '.', + }, CharacterTable::CP437 => CP437[self.0 as usize], } } |