R/functions.R
grep2.Rd
grep2 is a wraper around the traditional grep, that works with native pipe, returns value and are ignore case as default
grep2(x, arg1, ic = T, value = TRUE, ...)
data to search
pattern
ignore case
arguments passed to grep. See ?grep for more details
c("a", "b", "c", "d") |> grep2("a") #> [1] "a"