capitalizeFirstLetter: Captitalize first letter of each word in a character string

Description Usage Arguments Value Examples

View source: R/capitalizeFirstLetter.R

Description

Captitalize first letter of each word in a character string

Usage

1
capitalizeFirstLetter(words = "", lower = FALSE)

Arguments

words

character string with one or more words in each element.

lower

logical indicating whether remaining characters will be forced to lower case.

Value

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.

Examples

1
2
3
4
5
library(stringi, quietly = TRUE)
capitalizeFirstLetter(words = c("a", "vector of words",
                                 "TO BE CAPITALIZED."))
capitalizeFirstLetter(words = c("a", "vector of words",
                                 "TO BE CAPITALIZED."), lower = TRUE)

rmsharp/parentfindr documentation built on Nov. 29, 2020, 4:33 a.m.