1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
//! Unicode normalization helpers. use unicode_normalization::UnicodeNormalization; /// Returns the NFC normalization of `text`. #[must_use] pub fn normalize_nfc(text: &str) -> String { text.nfc().collect() } /// Returns the NFKC normalization of `text`. #[must_use] pub fn normalize_nfkc(text: &str) -> String { text.nfkc().collect() }