str_title_case() converts string to title case, capitalizing only the first letter of each word while ignoring articles, prepositions, and conjunctions
Usage
str_title_case(string)
Value
A character vector the same length as the string and in title case.
Arguments
string
Input vector. Either a character vector, or something
coercible to one.
Details
Please note that str_title_case() is different from stringr::str_to_title() which converts to title case, where only the first letter of each word is capitalized.
words <- "the quick brown fox jumps over a lazy dog"
str_title_case(words)
str_to_title(words)
words <- "A journey through the history of music"
str_title_case(words)
str_to_title(words)