capitalizeStrings: Capitalize strings in a vector

View source: R/capitalizeStrings.R

capitalizeStringsR Documentation

Capitalize strings in a vector

Description

Capitalise first word or all words of a character vector. Lower back of vector element or word, respectively.

Usage

capitalizeStrings(x, all.words = FALSE, lower.back = FALSE)

Arguments

x

[character(n)]
Vector of character elements to capitalize.

all.words

[logical(1)]
If TRUE all words of each vector element are capitalized. FALSE capitalizes the first word of each vector element.

lower.back

[logical(1)]
TRUE lowers the back of each word or vector element (depends on all.words).

Value

Capitalized vector: [character(n)].

Examples

capitalizeStrings(c("the taIl", "wags The dOg", "That looks fuNny!"))
capitalizeStrings(c("the taIl", "wags The dOg", "That looks fuNny!")
, all.words = TRUE, lower.back = TRUE)

BBmisc documentation built on Sept. 29, 2022, 5:12 p.m.