trim_anything: Trim something other than whitespace

Description Usage Arguments

Description

See strex::str_trim_anything().

Usage

1
2
3
trim_anything(string, pattern, side = "both")

str_trim_anything(string, pattern, side = "both")

Arguments

string

A character vector.

pattern

The pattern to look for.

The default interpretation is a regular expression, as described in stringi::about_search_regex.

To match a without regular expression (i.e. as a human would), use coll(). For details see stringr::regex().

side

Which side do you want to trim from? "both" is the default, but you can also have just either "left" or "right" (or optionally the shortened "b", "l" and "r").


filesstrings documentation built on April 18, 2021, 9:12 a.m.