str_detect_any: Detect whether any vector elements are in a string

View source: R/btools_strings.r

str_detect_anyR Documentation

Detect whether any vector elements are in a string

Description

Detect whether any vector elements are in a string

Usage

str_detect_any(s, elements)

Arguments

s

A string.

elements

Vector elements to look for.

Value

Logical indicating whether any of elements are found in s.

Examples

str_detect_any("abc defg ijk", c("123", "def", "11"))
str_detect_any("abc defg ijk", c("123", "xyz", "11"))

donboyd5/btools documentation built on Jan. 7, 2023, 10:47 p.m.