powered by
strs_replace replaces all occurrences of a specified substring in each element of a character vector. It is similar to Python's str.replace() method.
strs_replace
str.replace()
strs_replace(string, substring, replacement)
A character vector of the same length as string, with substring
string
substring
replaced by replacement.
replacement
A character vector where each element is a string in which to replace substring.
The substring to be replaced.
The string to replace substring with.
Python str.replace() documentation
strs_replace("hello world", "world", "there") strs_replace("banana", "na", "mo")
Run the code above in your browser using DataLab