R/p_grepl.r

Defines functions p_grepl

Documented in p_grepl

#' Searches for regular expressions
#' 
#' A wrapper function for `grepl()`, with the `x` argument listed first to support native piping.
#'
#' @param x the character string
#' @param ... additional arguments passed to [grepl()].
#'
#' @returns a logical object 
#' @export
#'
#' @examples
#' c('dog','elephant','cat','horse','hippopotamus') |> p_grepl('^h')
p_grepl<-function(x,...) {
  grepl(x=x,...)
}

Try the baseverse package in your browser

Any scripts or data that you put into this service are public.

baseverse documentation built on Oct. 27, 2026, 1:07 a.m.