str_title_case {forstringr} | R Documentation |
Convert string to title case
Description
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)
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.
Value
A character vector the same length as the string and in title case.
Examples
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)
[Package forstringr version 1.0.0 Index]