str_cap_words: str_cap_words

Description Usage Arguments Examples

Description

Function used to convert character vectors to CapWord format.

Usage

1
str_cap_words(string)

Arguments

string

character vector to turn into a CapWords

CapWords is distinguished by:

  1. All words with upper case first character

  2. No non-word characters allowed (letters/numbers only allowed)

The recipe for chaging into capwords is:

  1. replace whitespace and other word separators with space

  2. str_ucfirst

  3. strstdelete whitespace

Examples

1
2
3
# CAP WORDS
    str_cap_words( "One Flew Over The Cuckoo's Nest" )
    str_cap_words( "Catch-22" )  # CATCH

Example output

Loading required package: stringr
lettercase-0.13.1 - Copyright <U+00A9> 2019 Decision Patterns
[1] "OneFlewOverTheCuckoo'sNest"
[1] "Catch22"

lettercase documentation built on May 1, 2019, 9:45 p.m.