Description Usage Arguments Value Author(s) See Also Examples
Trim whitespace from ends of character
string
1 2 3 4 5 |
str |
|
character
Thomas P Harte
1 2 3 4 5 6 7 8 9 10 11 | # left trim:
cat(sprintf("'%s'\n", triml(" asdf qwerty \t")))
cat(sprintf("'%s'\n", triml("\tasdf qwerty \t")))
# right trim:
cat(sprintf("'%s'\n", trimr(" asdf qwerty \t")))
cat(sprintf("'%s'\n", trimr("\tasdf qwerty \t ")))
# left & right trim:
cat(sprintf("'%s'\n", trim(" asdf qwerty \t")))
cat(sprintf("'%s'\n", trim("\tasdf qwerty \t")))
cat(sprintf("'%s'\n", trim(" asdf qwerty \t")))
cat(sprintf("'%s'\n", trim("\tasdf qwerty \t ")))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.