str_cap_words: str_cap_words

Description Usage Arguments Examples

View source: R/str_cap_words.R

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
4
  # CAP WORDS 
    str_cap_words( "One Flew Over The Cuckoo's Nest" )
    str_cap_words( "Catch-22" )  # CATCH
 

decisionpatterns/lettercase documentation built on Sept. 23, 2017, 11:23 p.m.