strs_endswith | R Documentation |
strs_endswith
determines whether each element of a character vector ends
with a specified suffix. This function is similar to Python's
str.endswith()
method.
strs_endswith(string, suffix)
string |
A character vector where each element is a string to be checked. |
suffix |
The suffix to check for at the end of each element of |
A logical vector of the same length as string
, with each element
indicating whether the corresponding element of string
ends with suffix
.
Python str.endswith() documentation
strs_endswith("hello world", "world")
strs_endswith(c("test", "hello", "world"), "ld")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.