A small crate to efficiently transform unicode characters into ascii characters, e.g. โ๐๐๐๐ ๐๐๐๐๐ ๐๐ ๐๐๐๐ ๐ฉ๐ ๐ฃ๐ ๐๐
becomes Hahah Unicode lmao xd rofl
.
Here are some possible uses of this crate:
- Destruction of annoying unicode characters in people's names / messages.
- Destruction of unicode characters in environments where unicode is not allowed.
- Creating a filter for a messaging application (would allow you to stop stupid things like those with a mental age of 2 from spamming
๐ต๐ ๐ฒ๐บ ๐ ๐พ๐
and thinking they're the bees knees)
I created this crate for the purpose of my mail spam filter experiment, I wanted to be able to prevent junk mail with unicode characters in them from slipping through and I couldn't find an existing crate or library in any other language.
You may find that this crate can't handle some unicode characters, in that case, you can always submit a pull request or create an issue to allow uniaxe to become more successful at destroying unicode characters.
You can install the uniaxe library with ease.
You can add it to your Cargo.toml like so:
uniaxe = "0"
You can also use cargo-edit to add uniaxe to your crate:
cargo add uniaxe
I aim to keep the uniaxe api simple, as it should be.
use uniaxe::lookup::generate_table;
use uniaxe::uniaxe;
fn main() {
let table = generate_table();
let text = uniaxe("๐ก๐ค๐ค๐ ๐๐ฉ ๐ข๐ ๐'๐ข ๐จ๐ค ๐ฆ๐ช๐๐ง๐ ๐ฎ", &table);
println!("{}", text); // This will display "look at me i'm so quirky"
}
Uniaxe is tested thoroughly to ensure that it will not panic. It also forbids all unsafe code to ensure that software that depends on it is safe.