ReplacingEverythingBefore: 'RemoveParentName'

View source: R/utilities.R

ReplacingEverythingBeforeR Documentation

RemoveParentName

Description

Strips out everything up to and perhaps including a specific character.

Usage

ReplacingEverythingBefore(x, marker, include.marker = TRUE)

Arguments

x

A character containing text to be modified.

marker

A character containing the things to be searched for. You need to use backslashes if not matching for letters (e.g., a "\$". Where there are mutliple instances, the last is found.

include.marker

Whether or not the marker itself is to be replaced.

Value

A character.

Examples

ReplacingEverythingBefore("foo$fog$x", "\\$")
ReplacingEverythingBefore("foo$fog$x", "\\$", FALSE)
ReplacingEverythingBefore("GiraffeDogCat", "Dog", FALSE)
ReplacingEverythingBefore("GiraffeDogCat", "Dog", TRUE)

Displayr/flipFormat documentation built on Feb. 26, 2024, 12:37 a.m.