capwords: Capitalise the first letter of every word

Description Usage Arguments Details Value See Also Examples

Description

Capitalise the first letter of every word

Usage

1
capwords(s, strict = TRUE, sep = " ", collapse = " ")

Arguments

s

a character vector

strict

logical enforces the lower case for all letters not beginning a word

collapse

the character to separate the strings in the output

any

character separating the words in the input s

Details

Taken from the examples on the page toupper and modified slightly.

Value

a character vector

See Also

toupper substring

Examples

1
2
3
4
5
s <- c("a cat", "the_dog", "my bIRd")
capwords(s)
capwords(s, collapse = "_")
capwords(s, strict = FALSE)
capwords(s, sep="_", collapse=":")

steveped/spShortcuts documentation built on May 30, 2019, 5:39 p.m.