strrep
Find and replace substrings
Description
Examples
Input Arguments
Algorithms
The
strrep
function does not find empty character vectors or empty strings for replacement. That is, whenstr
andold
both contain the empty character vector (''
) or the empty string (""
),strrep
does not replace empty character vectors or strings with the contents ofnew
.Before replacing text,
strrep
finds all instances ofold
instr
, like thestrfind
function. For overlapping patterns,strrep
performs multiple replacements.
Extended Capabilities
Version History
Introduced before R2006a