str_remove_after: Remove everything after the first separator in a string

View source: R/strings.R

str_remove_afterR Documentation

Remove everything after the first separator in a string

Description

str_remove_after is a (vectorised) function that removes everything that appears after a chosen separator in a text string. This is primarily used to remove characters in security names that appear after the separator in order to make it easier to match companies by name.

Usage

str_remove_after(string, sep)

Arguments

string

Input vector.

sep

Where to split the string.

Details

Used in scripts: Robust function: TRUE

Value

Character vector with only the parts appearing before the separator.


AndreSjuve/dretools documentation built on Dec. 4, 2024, 3:12 a.m.