use ucfirst::ucfirst;
pub fn title_case<'a>(now: impl IntoIterator<Item = &'a str>, pre: &str) -> String {
now
.into_iter()
.map(|i| {
// i18n.site 欢迎您 -> Welcome To i18n.site
if pre.contains(i) {
i.into()
} else {
ucfirst(i)
}
})
.collect::<Vec<_>>()
.join(" ")
}