Skip to main content

scrub

Function scrub 

Source
pub fn scrub(text: &str) -> String
Expand description

A convenience function to perform a default “scrub” of text.

Normalizes to NFC, folds case, and strips diacritics.

use textprep::scrub;

assert_eq!(scrub("Müller"), "muller");
assert_eq!(scrub("Ñoño"), "nono");
assert_eq!(scrub("Café"), "cafe");