aboutsummaryrefslogtreecommitdiff
path: root/src/db/utils.rs
blob: 621a69ca427b7fcf8b2e4c905e53cc6ffafcd30e (plain)
1
2
3
pub fn format_key_for_search(value: &str) -> String {
    format!("replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(lower({}), 'à', 'a'), 'â', 'a'), 'ç', 'c'), 'è', 'e'), 'é', 'e'), 'ê', 'e'), 'ë', 'e'), 'î', 'i'), 'ï', 'i'), 'ô', 'o'), 'ù', 'u'), 'û', 'u'), 'ü', 'u')", value)
}