MATLAB Function Reference Previous page   Next Page
strrep

Find and replace substring

Syntax

Description

str = strrep(str1, str2, str3) replaces all occurrences of the string str2 within string str1 with the string str3.

strrep(str1, str2, str3), when any of str1, str2, or str3 is a cell array of strings, returns a cell array the same size as str1, str2, and str3 obtained by performing a strrep using corresponding elements of the inputs. The inputs must all be the same size (or any can be a scalar cell). Any one of the strings can also be a character array with the right number of rows.

Examples

See Also

strfind


Previous page  strread strtok Next page

© 1994-2005 The MathWorks, Inc.