
Reformat strings with leading whitespace for HTML
Source:R/replace_leading_whitespace.R
replace_leading_whitespace.Rd
Reformat strings with leading whitespace for HTML
Examples
x <- c(" Hello there", " Goodbye Friend ", "\tNice to meet you",
" \t What are you up to? \t \t ")
replace_leading_whitespace(x)
#> [1] " Hello there"
#> [2] " Goodbye Friend "
#> [3] " Nice to meet you"
#> [4] " What are you up to? \t \t "
replace_leading_whitespace(x, tab=2)
#> [1] " Hello there"
#> [2] " Goodbye Friend "
#> [3] " Nice to meet you"
#> [4] " What are you up to? \t \t "