str_detect {stringstatic}R Documentation

Detect the presence or absence of a pattern in a string

Description

Dependency-free drop-in alternative for stringr::str_detect().

Usage

str_detect(string, pattern, negate = FALSE)

Arguments

string

Input vector. Either a character vector, or something coercible to one.

pattern

Pattern to look for.

The default interpretation is a regular expression, as described in base::regex. Control options with regex().

Match a fixed string (i.e. by comparing only bytes), using fixed(). This is fast, but approximate.

negate

If TRUE, return non-matching elements.

Value

A logical vector.

Source

Adapted from the stringr package.


[Package stringstatic version 0.1.2 Index]