make_str_replace: Make replace, delete and "is" functions for strings

Description Usage Arguments Examples

View source: R/make_str_replace.R

Description

Functions for building string functions for replacement, deletion and testing

Usage

1
2
3
make_str_replace(pattern, replacement)

make_str_delete(pattern)

Arguments

pattern

pattern to look for, as defined by a POSIX regular expression. See the "Extended Regular Expressions" section of regex for details. See fixed, ignore.case and perl for how to use other types of matching: fixed, case insensitive and perl-compatible expressions.

replacement

string. References of the form \1, \2 will be replaced with the contents of the respective matched group (created by ()) within the pattern.

These functions build functions that take a single string argument and return a vector as a result.

make_str_replace builds a functions that replaces the strings according to the pattern and replacement arguments.

make_str_delete builds a functions that deletes the pattern from the string.

make_str_is builds a function that detects is the string is has a certain type of formatting.

Examples

1
# -tk

lettercase documentation built on May 29, 2017, 12:28 p.m.

Search within the lettercase package
Search all R packages, documentation and source code