Converts the first character of each string to uppercase and the rest to lowercase.
Value
A character vector with the same length as x, where each element
has its first character converted to uppercase and remaining characters are preserved as-is.
Examples
to_title(c("hELLO", "WoRLD", "R"))
#> [1] "HELLO" "WoRLD" "R"
# Returns: "Hello" "World" "R"