2019-10-02 17:34:32 +02:00
|
|
|
mod dfa;
|
|
|
|
|
|
|
|
|
2019-12-06 19:15:19 +01:00
|
|
|
pub use self::dfa::{build_dfa, build_prefix_dfa, build_exact_dfa};
|
2019-10-02 17:34:32 +02:00
|
|
|
|
|
|
|
pub fn normalize_str(string: &str) -> String {
|
|
|
|
let mut string = string.to_lowercase();
|
|
|
|
|
|
|
|
if !string.contains(is_cjk) {
|
|
|
|
string = deunicode::deunicode_with_tofu(&string, "");
|
|
|
|
}
|
|
|
|
|
|
|
|
string
|
|
|
|
}
|