trim_anything: Trim something other than whitespace

trim_anythingR Documentation

Trim something other than whitespace

Description

See strex::str_trim_anything().

Usage

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 Feb. 16, 2023, 7:25 p.m.