restore_capitals: Restore sustom capitalisation in a string

View source: R/restore_capitals.R

restore_capitalsR Documentation

Restore sustom capitalisation in a string

Description

Restore sustom capitalisation in a string

Usage

restore_capitals(x, items_to_capitalise)

Arguments

x

A string in which capitalisation needs to be restored

items_to_capitalise

Whole words or acronyms in which capitalisation must be retained; special characters can be included (e.g. "R2-D2")

Value

A string with restored capitals

Examples

x <- "Should i tell c-3po the french call him z-6po?"
restore_capitals(x, c("I", "C-3PO", "French", "Z-6PO"))


verbaliseR documentation built on Sept. 21, 2022, 9:10 a.m.