Detect patterns at the beginning or end of strings

str_starts(string, pattern, negate = FALSE)

str_ends(string, pattern, negate = FALSE)

Arguments

string

Input string

pattern

Pattern to match

negate

If TRUE, return non-matching elements

Value

a logical vector

See also

Author

Guangchuang Yu