Remove now useless util module
This commit is contained in:
parent
602ad96cfe
commit
f4a6435e6f
2 changed files with 0 additions and 19 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
mod drawer;
|
mod drawer;
|
||||||
mod printer;
|
mod printer;
|
||||||
mod server;
|
mod server;
|
||||||
mod util;
|
|
||||||
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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>()
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue