use crate::str;
pub fn combine(a: &str, b: &str) -> String {
let b = str::check_or_remove_suffix(b, "/");
if a.ends_with('/') {
if b.starts_with('/') {
format!("{}{}", a, str::check_or_remove_prefix(b, "/"))
} else {
format!("{}{}", a, b)
}
} else {
if b.starts_with('/') {
format!("{a}{b}")
} else {
format!("{a}/{b}")
}
}
}