powered by
Reformat strings with leading whitespace for HTML
replace_leading_whitespace(x, tab_width = 4)
String with replaced for leading whitespace
Target string
Number of spaces to compensate for tabs
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)
Run the code above in your browser using DataLab