Learn R Programming

cwhmisc (version 6.0)

delstr: Delete a substring from a string

Description

delstr deletes a substring from a string

Usage

delstr(str,del)

Arguments

str
a string, may be empty, string to be edited
del
a string, may be empty, string to be taken out.

Value

A string

Examples

Run this code
delstr("Ich gehen heuten in den Garten hinein","en")
#  "Ich geh heut in d Gart hinein"
delstr("12345","x") # "12345" 

Run the code above in your browser using DataLab