rm_dup: Remove consecutive duplicate characters in a string

View source: R/formatting.R

rm_dupR Documentation

Remove consecutive duplicate characters in a string

Description

Remove consecutive duplicate characters in a string

Usage

rm_dup(x, ch)

Arguments

x

String

ch

Duplicated character to remove

Value

String with duplicates removed.

Examples

rm_dup("this_is_my__string", "_")
rm_dup("this.is.my..string", ".")


BIO-RSG/oceancolouR documentation built on Nov. 3, 2024, 2:03 a.m.