{"id":13637338,"url":"https://github.com/null8626/decancer","last_synced_at":"2025-05-15T15:06:16.887Z","repository":{"id":40689631,"uuid":"380550243","full_name":"null8626/decancer","owner":"null8626","description":"A library that removes common unicode confusables/homoglyphs from strings.","archived":false,"fork":false,"pushed_at":"2025-03-20T16:28:17.000Z","size":2021969,"stargazers_count":108,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-08T18:52:46.413Z","etag":null,"topics":["confusables","homoglyphs","leetspeak","moderation","sanitizer","security","string","unicode","zalgo"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/null8626.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"null8626","ko_fi":"null8626"}},"created_at":"2021-06-26T16:41:17.000Z","updated_at":"2025-03-21T14:51:30.000Z","dependencies_parsed_at":"2023-12-16T07:26:32.177Z","dependency_job_id":"ea5da38f-d9cf-4c1e-9164-a9efaa2c953d","html_url":"https://github.com/null8626/decancer","commit_stats":{"total_commits":682,"total_committers":8,"mean_commits":85.25,"dds":"0.13343108504398826","last_synced_commit":"9572f31822ec89b10e8dc8bb4ab2da3e44f29ba1"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/null8626%2Fdecancer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/null8626%2Fdecancer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/null8626%2Fdecancer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/null8626%2Fdecancer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/null8626","download_url":"https://codeload.github.com/null8626/decancer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253554082,"owners_count":21926612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["confusables","homoglyphs","leetspeak","moderation","sanitizer","security","string","unicode","zalgo"],"created_at":"2024-08-02T00:01:15.614Z","updated_at":"2025-05-15T15:06:16.866Z","avatar_url":"https://github.com/null8626.png","language":"Rust","readme":"# decancer [![npm][npm-image]][npm-url] [![crates.io][crates-io-image]][crates-io-url] [![npm downloads][npm-downloads-image]][npm-url] [![crates.io downloads][crates-io-downloads-image]][crates-io-url] [![codacy][codacy-image]][codacy-url] [![ko-fi][ko-fi-brief-image]][ko-fi-url]\n\n[crates-io-image]: https://img.shields.io/crates/v/decancer?style=flat-square\n[crates-io-downloads-image]: https://img.shields.io/crates/d/decancer?style=flat-square\n[crates-io-url]: https://crates.io/crates/decancer\n[npm-image]: https://img.shields.io/npm/v/decancer.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/decancer\n[npm-downloads-image]: https://img.shields.io/npm/dt/decancer.svg?style=flat-square\n[codacy-image]: https://app.codacy.com/project/badge/Grade/d740b1aa867d42f2b37eb992ad73784a\n[codacy-url]: https://app.codacy.com/gh/null8626/decancer/dashboard\n[ko-fi-brief-image]: https://img.shields.io/badge/donations-ko--fi-red?color=ff5e5b\u0026style=flat-square\n[ko-fi-image]: https://ko-fi.com/img/githubbutton_sm.svg\n[ko-fi-url]: https://ko-fi.com/null8626\n\nA library that removes common unicode confusables/homoglyphs from strings.\n\n- Its core is written in [Rust](https://www.rust-lang.org) and utilizes a form of [**Binary Search**](https://en.wikipedia.org/wiki/Binary_search_algorithm) to ensure speed!\n- By default, it's capable of filtering **221,529 (19.88%) different unicode codepoints** like:\n  - All [whitespace characters](https://en.wikipedia.org/wiki/Whitespace_character)\n  - All [diacritics](https://en.wikipedia.org/wiki/Diacritic), this also eliminates all forms of [Zalgo text](https://en.wikipedia.org/wiki/Zalgo_text)\n  - Most [leetspeak characters](https://en.wikipedia.org/wiki/Leet)\n  - Most [homoglyphs](https://en.wikipedia.org/wiki/Homoglyph)\n  - Several emojis\n- Unlike other packages, this package is **[unicode bidi-aware](https://en.wikipedia.org/wiki/Bidirectional_text)** where it also interprets right-to-left characters in the same way as it were to be rendered by an application!\n- Its behavior is also highly customizable to your liking!\n\u003c!---[ begin DECANCER_GLOBAL ]---\u003e\n- And it's available in the following languages:\n  - [Rust](https://crates.io/crates/decancer)\n  - JavaScript ([Node.js](https://www.npmjs.com/package/decancer)/Browser)\n  - C/C++\n  - [Java](https://central.sonatype.com/artifact/io.github.null8626/decancer/overview)\n  - [Python](https://pypi.org/project/decancer-py) (unofficial)\n\u003c!---[ end ]---\u003e\n\n## Installation\n\n\u003c!---[ begin DECANCER_GLOBAL ]---\u003e\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eRust (v1.65 or later)\u003c/b\u003e\u003c/summary\u003e\n\u003c!---[ end, begin DECANCER_RUST ]---\u003e\n\nIn your `Cargo.toml`:\n\n```toml\ndecancer = \"3.2.8\"\n```\n\n\u003c!---[ end, begin DECANCER_GLOBAL ]---\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eJavaScript (Node.js)\u003c/b\u003e\u003c/summary\u003e\n\u003c!---[ end, begin DECANCER_JS ]---\u003e\n\nIn your shell:\n\n```sh\nnpm install decancer\n```\n\nIn your code (CommonJS):\n\n```js\nconst decancer = require('decancer')\n```\n\nIn your code (ESM):\n\n```js\nimport decancer from 'decancer'\n```\n\n\u003c!---[ end, begin DECANCER_GLOBAL ]---\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eJavaScript (Browser)\u003c/b\u003e\u003c/summary\u003e\n\nIn your code:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import init from 'https://cdn.jsdelivr.net/gh/null8626/decancer@v3.2.8/bindings/wasm/bin/decancer.min.js'\n\n  const decancer = await init()\n\u003c/script\u003e\n```\n\n\u003c/details\u003e\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eJava\u003c/b\u003e\u003c/summary\u003e\n\n### As a JAR file\n\n[You can download the latest JAR file here.](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer.jar)\n\n### As a dependency\n\nIn your `build.gradle`:\n\n```gradle\nrepositories {\n  mavenCentral()\n  maven { url 'https://jitpack.io' }\n}\n\ndependencies {\n  implementation 'io.github.null8626:decancer:3.2.8'\n}\n```\n\nIn your `pom.xml`:\n\n```xml\n\u003crepositories\u003e\n  \u003crepository\u003e\n    \u003cid\u003ecentral\u003c/id\u003e\n    \u003curl\u003ehttps://repo.maven.apache.org/maven2\u003c/url\u003e\n  \u003c/repository\u003e\n  \u003crepository\u003e\n    \u003cid\u003ejitpack.io\u003c/id\u003e\n    \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n  \u003c/repository\u003e\n\u003c/repositories\u003e\n\n\u003cdependencies\u003e\n  \u003cdependency\u003e\n    \u003cgroupId\u003eio.github.null8626\u003c/groupId\u003e\n    \u003cartifactId\u003edecancer\u003c/artifactId\u003e\n    \u003cversion\u003e3.2.8\u003c/version\u003e\n  \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n### Building from source\n\nWindows:\n\n```bat\ngit clone https://github.com/null8626/decancer.git --depth 1\ncd .\\decancer\\bindings\\java\npowershell -NoLogo -NoProfile -NonInteractive -Command \"Expand-Archive -Path .\\bin\\bindings.zip -DestinationPath .\\bin -Force\"\ngradle build -x test\n```\n\nmacOS/Linux:\n\n```sh\ngit clone https://github.com/null8626/decancer.git --depth 1\ncd ./decancer/bindings/java\nunzip ./bin/bindings.zip -d ./bin\nchmod +x ./gradlew\n./gradlew build -x test\n```\n\nTip: You can shrink the size of the resulting JAR file by removing binaries in the `bin` directory for the platforms you don't want to support.\n\n\u003c/details\u003e\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eC/C++\u003c/b\u003e\u003c/summary\u003e\n\u003c!---[ end, begin DECANCER_NATIVE ]---\u003e\n\n### Download\n\n- [Header file](https://raw.githubusercontent.com/null8626/decancer/v3.2.8/bindings/native/decancer.h)\n- [Download for ARM64 macOS (11.0+, Big Sur+)](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-aarch64-apple-darwin.zip)\n- [Download for ARM64 iOS](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-aarch64-apple-ios.zip)\n- [Download for Apple iOS Simulator on ARM6](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-aarch64-apple-ios-sim.zip)\n- [Download for ARM64 Android](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-aarch64-linux-android.zip)\n- [Download for ARM64 Windows MSVC](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-aarch64-pc-windows-msvc.zip)\n- [Download for ARM64 Linux (kernel 4.1, glibc 2.17+)](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-aarch64-unknown-linux-gnu.zip)\n- [Download for ARM64 Linux with MUSL](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-aarch64-unknown-linux-musl.zip)\n- [Download for ARMv6 Linux (kernel 3.2, glibc 2.17)](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-arm-unknown-linux-gnueabi.zip)\n- [Download for ARMv5TE Linux (kernel 4.4, glibc 2.23)](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-armv5te-unknown-linux-gnueabi.zip)\n- [Download for ARMv7-A Android](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-armv7-linux-androideabi.zip)\n- [Download for ARMv7-A Linux (kernel 4.15, glibc 2.27)](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-armv7-unknown-linux-gnueabi.zip)\n- [Download for ARMv7-A Linux, hardfloat (kernel 3.2, glibc 2.17)](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-armv7-unknown-linux-gnueabihf.zip)\n- [Download for 32-bit Linux w/o SSE (kernel 3.2, glibc 2.17)](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-i586-unknown-linux-gnu.zip)\n- [Download for 32-bit MSVC (Windows 7+)](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-i686-pc-windows-msvc.zip)\n- [Download for 32-bit FreeBSD](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-i686-unknown-freebsd.zip)\n- [Download for 32-bit Linux (kernel 3.2+, glibc 2.17+)](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-i686-unknown-linux-gnu.zip)\n- [Download for PPC64LE Linux (kernel 3.10, glibc 2.17)](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-powerpc64le-unknown-linux-gnu.zip)\n- [Download for RISC-V Linux (kernel 4.20, glibc 2.29)](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-riscv64gc-unknown-linux-gnu.zip)\n- [Download for S390x Linux (kernel 3.2, glibc 2.17)](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-s390x-unknown-linux-gnu.zip)\n- [Download for SPARC Solaris 11, illumos](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-sparcv9-sun-solaris.zip)\n- [Download for Thumb2-mode ARMv7-A Linux with NEON (kernel 4.4, glibc 2.23)](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-thumbv7neon-unknown-linux-gnueabihf.zip)\n- [Download for 64-bit macOS (10.12+, Sierra+)](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-x86_64-apple-darwin.zip)\n- [Download for 64-bit iOS](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-x86_64-apple-ios.zip)\n- [Download for 64-bit MSVC (Windows 7+)](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-x86_64-pc-windows-msvc.zip)\n- [Download for 64-bit FreeBSD](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-x86_64-unknown-freebsd.zip)\n- [Download for 64-bit illumos](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-x86_64-unknown-illumos.zip)\n- [Download for 64-bit Linux (kernel 3.2+, glibc 2.17+)](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-x86_64-unknown-linux-gnu.zip)\n- [Download for 64-bit Linux with MUSL](https://github.com/null8626/decancer/releases/download/v3.2.8/decancer-x86_64-unknown-linux-musl.zip)\n\n### Building from source\n\nBuilding from source requires [Rust v1.65 or later](https://rustup.rs/).\n\n```sh\ngit clone https://github.com/null8626/decancer.git --depth 1\ncd decancer/bindings/native\ncargo build --release\n```\n\nAnd the binary files should be generated in the `target/release` directory.\n\n\u003c!---[ end, begin DECANCER_GLOBAL ]---\u003e\n\u003c/details\u003e\n\u003c!---[ end ]---\u003e\n\n## Examples\n\n\u003c!---[ begin DECANCER_GLOBAL ]---\u003e\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eRust\u003c/b\u003e\u003c/summary\u003e\n\u003c!---[ end, begin DECANCER_RUST ]---\u003e\n\nFor more information, please read the [documentation](https://docs.rs/decancer).\n\n```rust\nlet mut cured = decancer::cure!(r\"vＥⓡ𝔂 𝔽𝕌Ňℕｙ ţ乇𝕏𝓣 wWiIiIIttHh l133t5p3/-\\|\u003c\").unwrap();\n\nassert_eq!(cured, \"very funny text with leetspeak\");\n\n// WARNING: it's NOT recommended to coerce this output to a Rust string\n//          and process it manually from there, as decancer has its own\n//          custom comparison measures, including leetspeak matching!\nassert_ne!(cured.as_str(), \"very funny text with leetspeak\");\n\nassert!(cured.contains(\"funny\"));\n\ncured.censor(\"funny\", '*');\nassert_eq!(cured, \"very ***** text with leetspeak\");\n\ncured.censor_multiple([\"very\", \"text\"], '-');\nassert_eq!(cured, \"---- ***** ---- with leetspeak\");\n```\n\n\u003c!---[ end, begin DECANCER_GLOBAL ]---\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eJavaScript (Node.js)\u003c/b\u003e\u003c/summary\u003e\n\u003c!---[ end, begin DECANCER_JS ]---\u003e\n\n```js\nconst assert = require('assert')\nconst cured = decancer('vＥⓡ𝔂 𝔽𝕌Ňℕｙ ţ乇𝕏𝓣 wWiIiIIttHh l133t5p3/-\\\\|\u003c')\n\nassert(cured.equals('very funny text with leetspeak'))\n\n// WARNING: it's NOT recommended to coerce this output to a JavaScript string\n//          and process it manually from there, as decancer has its own\n//          custom comparison measures, including leetspeak matching!\nassert(cured.toString() !== 'very funny text with leetspeak')\nconsole.log(cured.toString())\n// =\u003e very funny text wwiiiiitthh l133t5p3/-\\|\u003c\n\nassert(cured.contains('funny'))\n\ncured.censor('funny', '*')\nconsole.log(cured.toString())\n// =\u003e very ***** text wwiiiiitthh l133t5p3/-\\|\u003c\n\ncured.censorMultiple(['very', 'text'], '-')\nconsole.log(cured.toString())\n// =\u003e ---- ***** ---- wwiiiiitthh l133t5p3/-\\|\u003c\n```\n\n\u003c!---[ end, begin DECANCER_GLOBAL ]---\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eJavaScript (Browser)\u003c/b\u003e\u003c/summary\u003e\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"utf-8\" /\u003e\n    \u003ctitle\u003eDecancerer!!! (tm)\u003c/title\u003e\n    \u003cstyle\u003e\n      textarea {\n        font-size: 30px;\n      }\n    \n      #cure {\n        font-size: 20px;\n        padding: 5px 30px;\n      }\n    \u003c/style\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003ch3\u003eInput cancerous text here:\u003c/h3\u003e\n    \u003ctextarea rows=\"10\" cols=\"30\"\u003e\u003c/textarea\u003e\n    \u003cbr /\u003e\n    \u003cbutton id=\"cure\" onclick=\"cure()\"\u003ecure!\u003c/button\u003e\n    \u003cscript type=\"module\"\u003e\n      import init from 'https://cdn.jsdelivr.net/gh/null8626/decancer@v3.2.8/bindings/wasm/bin/decancer.min.js'\n    \n      const decancer = await init()\n    \n      window.cure = function () {\n        const textarea = document.querySelector('textarea')\n        \n        if (!textarea.value.length) {\n          return alert(\"There's no text!!!\")\n        }\n        \n        textarea.value = decancer(textarea.value).toString()\n      }\n    \u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n[See this in action here.](https://null8626.github.io/decancer/wasm_example)\n\n\u003c/details\u003e\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eJava\u003c/b\u003e\u003c/summary\u003e\n\nFor more information, please read the [documentation](https://javadoc.io/doc/io.github.null8626/decancer).\n\n```java\nimport io.github.null8626.decancer.CuredString;\n\npublic class Program {\n  public static void main(String[] args) {\n    CuredString cured = new CuredString(\"vＥⓡ𝔂 𝔽𝕌Ňℕｙ ţ乇𝕏𝓣 wWiIiIIttHh l133t5p3/-\\\\|\u003c\");\n    \n    assert cured.equals(\"very funny text with leetspeak\");\n    \n    // WARNING: it's NOT recommended to coerce this output to a Java String\n    //          and process it manually from there, as decancer has its own\n    //          custom comparison measures, including leetspeak matching!\n    assert !cured.toString().equals(\"very funny text with leetspeak\");\n    System.out.println(cured.toString());\n    // =\u003e very funny text wwiiiiitthh l133t5p3/-\\|\u003c\n    \n    assert cured.contains(\"funny\");\n    \n    cured.censor(\"funny\", '*');\n    System.out.println(cured.toString());\n    // =\u003e very ***** text wwiiiiitthh l133t5p3/-\\|\u003c\n    \n    String[] keywords = { \"very\", \"text\" };\n    cured.censorMultiple(keywords, '-');\n    System.out.println(cured.toString());\n    // =\u003e ---- ***** ---- wwiiiiitthh l133t5p3/-\\|\u003c\n    \n    cured.destroy();\n  }\n}\n```\n\n\u003c/details\u003e\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eC/C++\u003c/b\u003e\u003c/summary\u003e\n\u003c!---[ end, begin DECANCER_NATIVE ]---\u003e\n\nFor more information, please read the [documentation](https://null8626.github.io/decancer/native_docs).\n\nUTF-8 example:\n\n```c\n#include \u003cdecancer.h\u003e\n\n#include \u003cstring.h\u003e\n#include \u003cstdlib.h\u003e\n#include \u003cstdio.h\u003e\n\n#define decancer_assert(expr, notes)                           \\\n  if (!(expr)) {                                               \\\n    fprintf(stderr, \"assertion failure at \" notes \"\\n\");       \\\n    ret = 1;                                                   \\\n    goto END;                                                  \\\n  }\n\nint main(void) {\n  int ret = 0;\n\n  // UTF-8 bytes for \"vＥⓡ𝔂 𝔽𝕌Ňℕｙ ţ乇𝕏𝓣\"\n  uint8_t input[] = {0x76, 0xef, 0xbc, 0xa5, 0xe2, 0x93, 0xa1, 0xf0, 0x9d, 0x94, 0x82, 0x20, 0xf0, 0x9d,\n                     0x94, 0xbd, 0xf0, 0x9d, 0x95, 0x8c, 0xc5, 0x87, 0xe2, 0x84, 0x95, 0xef, 0xbd, 0x99,\n                     0x20, 0xc5, 0xa3, 0xe4, 0xb9, 0x87, 0xf0, 0x9d, 0x95, 0x8f, 0xf0, 0x9d, 0x93, 0xa3};\n\n  decancer_error_t error;\n  decancer_cured_t cured = decancer_cure(input, sizeof(input), DECANCER_OPTION_DEFAULT, \u0026error);\n\n  if (cured == NULL) {\n    fprintf(stderr, \"curing error: %.*s\\n\", (int)error.message_length, error.message);\n    return 1;\n  }\n\n  decancer_assert(decancer_contains(cured, \"funny\", 5), \"decancer_contains\");\n\nEND:\n  decancer_cured_free(cured);\n  return ret;\n}\n```\n\nUTF-16 example:\n\n```c\n#include \u003cdecancer.h\u003e\n\n#include \u003cstring.h\u003e\n#include \u003cstdlib.h\u003e\n#include \u003cstdio.h\u003e\n\n#define decancer_assert(expr, notes)                           \\\n  if (!(expr)) {                                               \\\n    fprintf(stderr, \"assertion failure at \" notes \"\\n\");       \\\n    ret = 1;                                                   \\\n    goto END;                                                  \\\n  }\n\nint main(void) {\n  int ret = 0;\n\n  // UTF-16 bytes for \"vＥⓡ𝔂 𝔽𝕌Ňℕｙ ţ乇𝕏𝓣\"\n  uint16_t input[] = {\n    0x0076, 0xff25, 0x24e1,\n    0xd835, 0xdd02, 0x0020,\n    0xd835, 0xdd3d, 0xd835,\n    0xdd4c, 0x0147, 0x2115,\n    0xff59, 0x0020, 0x0163,\n    0x4e47, 0xd835, 0xdd4f,\n    0xd835, 0xdce3\n  };\n\n  // UTF-16 bytes for \"funny\"\n  uint16_t funny[] = { 0x66, 0x75, 0x6e, 0x6e, 0x79 };\n\n  decancer_error_t error;\n  decancer_cured_t cured = decancer_cure_utf16(input, sizeof(input) / sizeof(uint16_t), DECANCER_OPTION_DEFAULT, \u0026error);\n\n  if (cured == NULL) {\n    fprintf(stderr, \"curing error: %.*s\\n\", (int)error.message_length, error.message);\n    return 1;\n  }\n\n  decancer_assert(decancer_contains_utf16(cured, funny, sizeof(funny) / sizeof(uint16_t)), \"decancer_contains_utf16\");\n\nEND:\n  decancer_cured_free(cured);\n  return ret;\n}\n```\n\n\u003c!---[ end, begin DECANCER_GLOBAL ]---\u003e\n\u003c/details\u003e\n\u003c!---[ end ]---\u003e\n\n## Donations\n\nIf you want to support my eyes for manually looking at thousands of unicode characters, consider donating! ❤\n\n[![ko-fi][ko-fi-image]][ko-fi-url]\n\n\u003c!---[ begin DECANCER_GLOBAL ]---\u003e\n\n## Contributing\n\nPlease read [`CONTRIBUTING.md`](https://github.com/null8626/decancer/blob/main/CONTRIBUTING.md) for newbie contributors who want to contribute!","funding_links":["https://github.com/sponsors/null8626","https://ko-fi.com/null8626"],"categories":["Libraries"],"sub_categories":["Text processing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnull8626%2Fdecancer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnull8626%2Fdecancer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnull8626%2Fdecancer/lists"}