str_contains {rbmi}R Documentation

Does a string contain a substring

Description

Returns a vector of TRUE/FALSE for each element of x if it contains any element in subs

i.e.

str_contains( c("ben", "tom", "harry"), c("e", "y"))
[1] TRUE FALSE TRUE

Usage

str_contains(x, subs)

Arguments

x

character vector

subs

a character vector of substrings to look for


[Package rbmi version 1.2.6 Index]