strs_removesuffix | R Documentation |
strs_removesuffix
removes a specified suffix from the end of each element
of a character vector. It is similar to Python's str.removesuffix()
method.
strs_removesuffix(string, suffix)
string |
A character vector where each element is a string from which to remove the suffix. |
suffix |
The suffix to remove. |
A character vector of the same length as string
, with the suffix
removed from each element.
Python str.removesuffix() documentation
strs_removesuffix("StringTest", "Test")
strs_removesuffix("hello world", "world")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.