Description
Detect the presence or absence of a pattern at the beginning or end of a string or string vector.
Usage
str_starts(string, pattern, negate = FALSE)str_ends(string, pattern, negate = FALSE)
Arguments
- string
input string
- pattern
pattern with which the string starts or ends
- negate
if TRUE, return non-matching elements