Learn R Programming

bfw (version 0.4.2)

CapWords: Capitalize Words

Description

capitalize the first letter in each words in a string

Usage

CapWords(s, strict = FALSE)

Arguments

s

string

strict

logical, indicating whether or not string it set to title case , Default: FALSE

Value

returns capitalized string

Examples

Run this code
# NOT RUN {
 CapWords("example eXAMPLE", FALSE)
 # [1] "Example EXAMPLE"
 CapWords("example eXAMPLE", TRUE)
 # [1] "Example Example"
# }

Run the code above in your browser using DataLab