Find and replace substrings
The strrep function does
not find empty character vectors or empty strings
for replacement. That is, when
str and old
both contain the empty character vector
('') or the empty string
(""), strrep
does not replace empty character vectors or
strings with the contents of
new.
Before replacing text, strrep finds
all instances of old in str,
like the strfind function. For overlapping patterns, strrep performs
multiple replacements.