yeah you can update levels now cool

This commit is contained in:
Reid 2023-09-04 21:26:13 -07:00
parent ac8a121a8c
commit af1e423b56
Signed by: reidlab
GPG key ID: 6C9EAA3364F962C8
5 changed files with 41 additions and 16 deletions

View file

@ -1,6 +1,11 @@
use regex::Regex;
pub fn clean(string: &str) -> String {
pub fn clean_no_space(string: &str) -> String {
let regex = Regex::new(r"[^a-zA-z0-9_-]").unwrap();
return regex.replace_all(string, "").to_string();
}
pub fn clean_basic(string: &str) -> String {
let regex = Regex::new(r"[^A-Za-z0-9\-_ ]").unwrap();
return regex.replace_all(string, "").to_string();
}