Description Usage Arguments Details References Examples
String / text processing functions
1 2 3 4 5 6 7 8 9 |
x |
a character vector |
n |
an integer of length 1. |
... |
addtional parameters used by specific functions. See Details. |
trim
returns a version of x
without trailing OR leading spaces.
chomp
returns a version of x
without trailing newline delimiters.
text_wrap
returns a version of x in which each element substitutes newline
delimiters for the immediate next space (e.g. ' ') after every n
th character.
translit
returns a version of x
recoded to ASCII, using iconv
and
//TRANSLIT
. Parameters in ...
are passed directly to iconv
.
rand_string
returns a randomly generated alphanumeric string of length n
.
I attribute the regular expression that powers text_wrap()
to StackOverflow user xiechao:
http://stackoverflow.com/a/2352006/3277821
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.