estebank / unicode_skeleton

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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"

About

License:Other


Languages

Language:Rust 100.0%