Section: String Functions
p = strrep(source,find,replace)
Every instance of the string find
in the string source
is
replaced with the string replace
. Any of source
, find
and replace
can be a cell array of strings, in which case
each entry has the replace operation applied.
strrep
. First the case
where are the arguments are simple strings
--> strrep('Matlab is great','Matlab','FreeMat') ans = FreeMat is great --> quit
And here we have the replace operation for a number of strings:
--> strrep({'time is money';'A stitch in time';'No time for games'},'time','money') ans = ['money is money'] ['A stitch in money'] ['No money for games'] --> quit