p_gsub: Replaces regular expressions

View source: R/p_gsub.r

p_gsubR Documentation

Replaces regular expressions

Description

A wrapper function for gsub(), with the x argument listed first to support native piping.

Usage

p_gsub(x, ...)

Arguments

x

the character string

...

additional arguments passed to gsub().

Value

a logical object

Examples

c('dog','elephant','cat','horse','hippopotamus') |> p_gsub('^h','H')

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