use rand::seq::IndexedRandom;
pub const PREFIXES: [&'static str; 10] = [
"<3 ",
"0w0 ",
"H-hewwo?? ",
"HIIII! ",
"Haiiii! ",
"Huohhhh. ",
"OWO ",
"OwO ",
"UwU ",
"uwu ",
];
pub const SUFFIXES: [&str; 31] = [
" :3",
" (●´ω`●)",
" UwU",
" (✿ ♡‿♡)",
" ÙωÙ",
" ʕʘ‿ʘʔ",
" ʕ•̫͡•ʔ",
" >_>",
" ^_^",
"..",
" Huoh.",
" ^-^",
" ;_;",
" ;-;",
" xD",
" x3",
" :D",
" :P",
" ;3",
" XDDD",
", fwendo",
" ㅇㅅㅇ",
" (人◕ω◕)",
"(^v^)",
" x3",
" ._.",
" ( \"◟ \")",
" (• o •)",
" (;ω;)",
" (◠‿◠✿)",
" >_<",
];
pub const SUBSTITUTIONS: [(&str, &str); 10] = [
("r", "w"),
("l", "w"),
("R", "W"),
("L", "W"),
("no", "nu"),
("has", "haz"),
("have", "haz"),
("you", "uu"),
("the ", "da "),
("The ", "Da "),
];
pub fn add_affixes(msg: String) -> String {
let prefix = PREFIXES.choose(&mut rand::rng()).unwrap_or(&"Huohhhh. ");
let suffix = SUFFIXES.choose(&mut rand::rng()).unwrap_or(&" UwU");
format!("{prefix}{msg}{suffix}")
}
pub fn substitute(msg: &mut String) -> &String {
for substiution in SUBSTITUTIONS.iter() {
*msg = msg.replace(substiution.0, substiution.1);
}
msg
}
pub fn owo(msg: String) -> String {
let mut new_msg = add_affixes(msg);
substitute(&mut new_msg).to_owned()
}