View source: R/capitalize_first_letter.R
capitalize_first_letter | R Documentation |
Captitalize first letter of each word in a character string
capitalize_first_letter(words = "", lower = FALSE)
words |
character string with one or more words in each element. |
lower |
logical indicating whether remaining characters will be forced to lower case. |
character string with first character of each word capitalized and remaining characters either left alone or are forced to lower case.
In many cases the user will want to use tools::toTitleCase
instead.
library(stringi, quietly = TRUE)
capitalize_first_letter(words = c("a", "vector of words",
"TO BE CAPITALIZED."))
capitalize_first_letter(words = c("a", "vector of words",
"TO BE CAPITALIZED."), lower = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.