replace_leading_whitespace: Reformat strings with leading whitespace for HTML

View source: R/replace_leading_whitespace.R

replace_leading_whitespaceR Documentation

Reformat strings with leading whitespace for HTML

Description

Reformat strings with leading whitespace for HTML

Usage

replace_leading_whitespace(x, tab_width = 4)

Arguments

x

Target string

tab_width

Number of spaces to compensate for tabs

Value

String with   replaced for leading whitespace

Examples

x <- c(" Hello there", "  Goodbye Friend ",  "\tNice to meet you",
"  \t What are you up to? \t \t ")
replace_leading_whitespace(x)

replace_leading_whitespace(x, tab=2)


Tplyr documentation built on May 29, 2024, 10:37 a.m.