unicode_skeleton

This crate detects unicode strings that look nearly identical once rendered, but do not compare as equal. It defines "confusable" and "skeleton" based on Unicode Standard Annex #39.


Keywords
text, unicode, confusable, skeleton
Licenses
MIT/Apache-2.0

Documentation

Unicode character "confusable" detection and "skeleton" computation, specified by the Unicode Standard Annex #39. These functions are for working with strings that appear nearly identical once rendered, but do not compare as equal.

Documentation

extern crate unicode_skeleton;

use unicode_skeleton::{UnicodeSkeleton, confusable};

fn main() {
    assert_eq!("𝔭𝒢ỿ𝕑𝕒ℓ".skeleton_chars().collect::<String>(), "paypal");
    assert!(confusable("β„π“Šπ“ˆπ“‰", "Rust"));
}

crates.io

Adding the following to your Cargo.toml to use:

[dependencies]
unicode_skeleton = "0.1.1"