| Crates.io | decancer |
| lib.rs | decancer |
| version | 3.3.3 |
| created_at | 2022-07-11 14:48:19.513054+00 |
| updated_at | 2025-07-16 18:30:56.264434+00 |
| description | A library that removes common unicode confusables/homoglyphs from strings. |
| homepage | |
| repository | https://github.com/null8626/decancer |
| max_upload_size | |
| id | 623848 |
| size | 179,100 |
A library that removes common unicode confusables/homoglyphs from strings.
In your Cargo.toml:
decancer = "3.3.3"
For more information, please read the documentation.
let mut cured = decancer::cure!(r"vοΌ₯β‘π π½πΕβο½ Ε£δΉππ£ wWiIiIIttHh l133t5p3/-\|<").unwrap();
assert_eq!(cured, "very funny text with leetspeak");
// WARNING: it's NOT recommended to coerce this output to a Rust string
// and process it manually from there, as decancer has its own
// custom comparison measures, including leetspeak matching!
assert_ne!(cured.as_str(), "very funny text with leetspeak");
assert!(cured.contains("funny"));
cured.censor("funny", '*');
assert_eq!(cured, "very ***** text with leetspeak");
cured.censor_multiple(["very", "text"], '-');
assert_eq!(cured, "---- ***** ---- with leetspeak");
If you want to support my eyes for manually looking at thousands of unicode characters, consider donating! β€