str-starts-ends: str_starts

str_startsR Documentation

str_starts

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

Value

a logical vector

Author(s)

Guangchuang Yu


yulab.utils documentation built on Sept. 11, 2024, 9:25 p.m.