filesstrings (version 3.0.0)

singleize: Remove back-to-back duplicates of a pattern in a string.

Description

See strex::str_singleize().

Usage

singleize(string, pattern)

Arguments

string

A character vector. The string(s) to be purged of duplicates.

pattern

A character vector. Pattern(s) specified like the pattern(s) in the stringr package (e.g. look at stringr::str_locate()). If this has length >1 its length must be the same as that of string.