Remove now useless util module

This commit is contained in:
Joscha 2024-03-08 18:14:19 +01:00
parent 602ad96cfe
commit f4a6435e6f
2 changed files with 0 additions and 19 deletions

View file

@ -1,7 +1,6 @@
mod drawer;
mod printer;
mod server;
mod util;
use std::path::PathBuf;

View file

@ -1,18 +0,0 @@
const CODE_PAGE_437_SECOND_HALF: &str = concat!(
"ÇüéâäàåçêëèïîìÄÅ",
"ÉæÆôöòûùÿÖÜ¢£¥₧ƒ",
"áíóúñѪº¿⌐¬½¼¡«»",
"░▒▓│┤╡╢╖╕╣║╗╝╜╛┐",
"└┴┬├─┼╞╟╚╔╩╦╠═╬╧",
"╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀",
"αßΓπΣσµτΦΘΩδ∞φε∩",
"≡±≥≤⌠⌡÷≈°∙·√ⁿ²■",
);
fn is_safe(c: char) -> bool {
c.is_ascii_graphic() || c == ' ' || c == '\n' || CODE_PAGE_437_SECOND_HALF.contains(c)
}
pub fn sanitize(text: &str) -> String {
text.chars().filter(|&c| is_safe(c)).collect::<String>()
}