powered by
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
str.removesuffix()
strs_removesuffix(string, suffix)
A character vector of the same length as string, with the suffix
string
suffix
removed from each element.
A character vector where each element is a string from which to remove the suffix.
The suffix to remove.
Python str.removesuffix() documentation
strs_removesuffix("StringTest", "Test") strs_removesuffix("hello world", "world")
Run the code above in your browser using DataLab