make_capital_letters: Capitalizes all words of a string

View source: R/string-manipulation.R

make_capital_lettersR Documentation

Capitalizes all words of a string

Description

Splits the string in single words by the regex specified in split.by and capitalizes every resulting word which are eventually collapsed with the string specified in collapse.with.

Usage

make_capital_letters(
  string,
  split.by = "_",
  collapse.with = " ",
  capital.letters = TRUE
)

Arguments

string

Character value.

split.by

Character value. Specfies the regex by which the words of the specified string are split.

collapse.with

Character value or NULL. If character, specifies the string with which all capitalized words of the input string are reunited to the output string. (Default is an empty space.)

capital.letters

Logical. If set to FALSE capitalization is skipped.

Value

A more aesthetically pleasing version of the input.


kueckelj/confuns documentation built on July 4, 2024, 4:53 p.m.