strs_strip | R Documentation |
strs_strip
removes leading and trailing characters (spaces by default) from
each element of a character vector. It is similar to Python's str.strip()
method.
strs_strip(string, chars = NULL)
string |
A character vector where each element is a string to be stripped. |
chars |
An optional string of characters to be removed from both ends of each element. If NULL, whitespace is removed. |
A character vector of the same length as string
, with specified
characters removed from both ends of each element.
Python str.strip() documentation
strs_strip(" hello world ")
strs_strip("xxxyhello worldyyy", chars = "xy")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.