Expand description
Transforms a unicode string by replacing unusual characters with similar-looking common characters, as specified by the Unicode Standard Annex #39. For example, ββπππβ will be transformed to βRustβ. This simplified string is called the βskeletonβ.
use unicode_skeleton::UnicodeSkeleton;
"βπππ".skeleton_chars().collect::<String>() // "Rust"Strings are considered βconfusableβ if they have the same skeleton. For example, ββπππβ and βRustβ are confusable.
use unicode_skeleton::confusable;
confusable("βπππ", "Rust") // trueThe translation to skeletons is based on Unicode Security Mechanisms for UTR #39 version 10.0.0.
StructsΒ§
- Skeleton
Chars - An iterator over the characters of the skeleton of a unicode string.
This is retrieved via the
UnicodeSkeletontrait.
TraitsΒ§
- Unicode
Skeleton - Method for retrieving a
SkeletonCharsfrom astror otherchariterator.
FunctionsΒ§
- confusable
- Test if two strings have the same βskeletonβ, and thus could be visually confused for each another.