Skip to main content

matches_normalized

Function matches_normalized 

Source
pub fn matches_normalized(a: &str, b: &str, opts: &MatchingOptions) -> bool
Expand description

Check whether two strings match after full normalization.

Returns true if both strings produce the same matching form after NFKC normalization, case folding, and confusable skeleton mapping.

§Examples

use simd_normalizer::matching::{matches_normalized, MatchingOptions};

let opts = MatchingOptions::default();

// "File" and "file" match (case folding)
assert!(matches_normalized("File", "file", &opts));

// Latin 'a' and Cyrillic 'а' match (confusable mapping)
assert!(matches_normalized("a", "\u{0430}", &opts));