makepretty: Make a string pretty!

Description Usage Arguments Value Examples

Description

strips newlines and blocks of 4 spaces from strings. I use this when I want to have newlines and 4-space tabs in strings *in my script*, but would also like to print them to the console in a sensible way.

Usage

1

Arguments

x

string (i.e., character vector of length 1)

Value

string that is the same as x but with all newline ('\n') and 4-space blocks (' ') replaced with the empty string.

Examples

1
2
3
4
5
6
7
## Not run: 
msg = 'Hello, I will type a message to you
    like this!'
message(msg)
message(makepretty(msg))

## End(Not run)

alyssafrazee/usefulstuff documentation built on May 12, 2019, 2:33 a.m.