
export function titlecase(str: string) {
    return str.replaceAll(/-/g, " ").replaceAll(/_/g, " ").split(" ").map(word => {
        if (word == "and" || word == "or" || word == "the" || word == "in" || word == "on" || word == "at" || word == "to" || word == "for" || word == "but" || word == "is" || word == "of") return word;
        return word.charAt(0).toUpperCase() + word.slice(1);
    }).join(" ");
}