Decancer Versions Save

A library that removes common unicode confusables/homoglyphs from strings.

v3.2.0

1 month ago

decancer v3.2.0 is here!

This may not be a major update, but this update brings in lots of big changes!

  • You can now support me through donations at ko-fi!
  • Add over 5,600 new codepoints (through lots of brute-force...) and fix several translations!
  • Remove support for "formatting" strings, and the formatter option is now renamed to all!
  • Add ascii_only and alphanumeric_only options!
  • Remove all unsafe code in the Rust, Node.js, and WebAssembly crates! (#20)
  • Fix GitHub Pages being extremely outdated! (last deployed in August 2023)
  • As of 19 April 2024, all GitHub commits sent to this repository (both manual and automated) will be GPG-signed!
  • Fix potential undefined behavior in tests! (#24)
  • Bump minimum supported Rust version from v1.64.0 to v1.65.0! (as required by the regex crate)
  • Add 64-bit FreeBSD support back for the Node.js library!
  • Update several CI dependencies.

Thank you so much for supporting decancer! Much love! :heart::heart::heart:

v3.1.2

2 months ago

decancer v3.1.2 is here!

This update brings in lots of notable fixes and changes!

  • Deprecated .into_str(), use .into() or .as_str() instead.
  • Fixed #23, as it was discovered that the bug still persists by v3.0.0.
  • Added at most 565 codepoints from various sources! (...Including brute-forcing, god my eyes hurt)
  • Fixed the broken codepoints counter in the README! Now it should reflect the true codepoints count.
  • Various refactors in the core Rust crate!

Thank you so much for supporting decancer! Much love! :heart::heart:

v3.1.1

2 months ago

decancer v3.1.1 is here!

This update brings in a lot of new features!

  • Added a findMultiple() method that matches several keywords!
  • Added a censor() method that censors matches of a string!
  • Added a censorMultiple() method that censors matches of several keywords!
  • Added a replace() method that replaces matches of a string!
  • Added a replaceMultiple() method that replaces matches of several keywords!

Thank you so much for supporting decancer! Much love :heart::heart:

v3.1.0

2 months ago

decancer v3.1.0 is here!

This update brings in several notable changes! Most importantly, added multi-character leetspeak matching support!

Other than that, other changes in this update are as follows:

  • Added a find() method for yielding all matches of a string!
  • Added UTF-16 support in the C/C++ binding!
  • Renamed decancer_free to decancer_cured_free for consistency in the C/C++ binding!
  • In the C/C++ binding, decancer_error_t is now a struct containing the error message, thus rendering the decancer_error function obselete!
  • In the Rust and C/C++ crates, added options and leetspeak feature flags (enabled by default) that can be opt-out!
  • Fixed potential memory leak while calling decancer_cure_char by adding a decancer_translation_free function!
  • Significant refactors to the string matching algorithm!

Thank you so much for supporting decancer! Much love :heart:

v3.0.2

2 months ago

decancer v3.0.2 is here!

This is another quick bugfix update! This update fixes a bug that apparently causes the disable_bidi option to actually work the other way around and a bug that causes decancer to compare strings (the equal function) slightly incorrectly.

Happy coding as always! :heart:

v3.0.1

3 months ago

decancer v3.0.1 is here!

This is a primarily a quick bugfix update! This update fixes a bug that causes decancer to erroneously match -!?hel with hell, and a bug that causes Java binding to be outdated compared to other bindings.

And since this update is released 11 hours after the previous major update (v3.0.0), i'll also quote the previous major changes to keep you updated!

Added a way to customize decancer's behavior!

This update was proposed by #23, and now it's finally here! This makes it a breaking change for both Rust and C/C++ users.

  • Rust: decancer::cure("text").unwrap(); becomes decancer::cure!("text").unwrap(); or decancer::cure("text", options).unwrap();
  • C/C++: decancer_cure(text, sizeof(text), &error_code); becomes decancer_cure(text, sizeof(text), DECANCER_OPTION_DEFAULT, &error_code);

More advanced way of matching similar strings

Decancer now also adopts an algorithm that lets it detect more complex looking strings! Like:

  • heeelllooooo now matches with hello
  • h-e-l-l-l-o now matches with hello
  • h e--l-l!o!o! now matches with hello

This way of matching strings is inspired by JPBBerry over at CensorBot. Soo kudos to him!

Added Java support!

This was originally attempted by anominy, but is now scrapped, soo i decided to do it myself! For more information, see the README.

Thank you all for supporting decancer! Happy coding! :heart::heart:

v3.0.0

3 months ago

decancer v3.0.0 is here!

Yup, another major update! This update brings in three major changes:

Added a way to customize decancer's behavior!

This update was proposed by #23, and now it's finally here! This makes it a breaking change for both Rust and C/C++ users.

  • Rust: decancer::cure("text").unwrap(); becomes decancer::cure!("text").unwrap(); or decancer::cure("text", options).unwrap();
  • C/C++: decancer_cure(text, sizeof(text), &error_code); becomes decancer_cure(text, sizeof(text), DECANCER_OPTION_DEFAULT, &error_code);

More advanced way of matching similar strings

Decancer now also adopts an algorithm that lets it detect more complex looking strings! Like:

  • heeelllooooo now matches with hello
  • h-e-l-l-l-o now matches with hello
  • h e--l-l!o!o! now matches with hello

This way of matching strings is inspired by JPBBerry over at CensorBot. Soo kudos to him!

Added Java support!

This was originally attempted by anominy, but is now scrapped, soo i decided to do it myself! For more information, see the README.

Thank you all for supporting decancer! Happy coding! Much love!! :heart::heart::heart:

v2.0.2

3 months ago

decancer v2.0.2 is here!

What this update brings:

  • Refactored several parts of the core's code! This improvement should also affect every binding.
  • Removed node: imports in the Node.js binding, as the node: protocol import is still not widely supported at the moment.
  • Fixed some incorrect translations!
  • Bumped several dependencies.

Thank you for supporting decancer as always! Happy coding! ❤️

v2.0.1

4 months ago

decancer v2.0.1 is here!

This is a minor update following the previous major v2.0.0 update. It adds 24 more codepoints and fixes several incorrect translations by incorporating codepoints from other sources/projects!

Thank you for supporting decancer as always! ❤️❤️❤️

v2.0.0

4 months ago

decancer v2.0.0 is here!

This is a major update that brings many features with several breaking changes!

What this update brings:

  • Added unicode bidi support! this means that the library supports Arabic, Hebrew, and many other right-to-left characters again! (#19)
  • As a side effect of the major bidi feature, the main cure function now can return an error. This is a breaking change for the Rust and C/C++ binding.
  • Removed support for FreeBSD systems due to build issues.

Thank you for supporting decancer as always! Happy 2024! ❤️❤️❤️