Skip to main content

skeleton

Function skeleton 

Source
pub fn skeleton(input: &str) -> String
Expand description

Compute the UTS #39 skeleton of a string.

The skeleton algorithm: NFD(confusable_map(NFD(input))), iterated to a fixed point. Iteration is required because some confusable expansions produce characters that themselves have confusable mappings; UTS #39 specifies that skeleton(skeleton(X)) = skeleton(X), so we converge before returning.

Two strings are confusable (visually similar) if and only if skeleton(a) == skeleton(b).