insertBefore
Insert strings before specified substrings
Description
inserts newStr
= insertBefore(str
,pat
,newText
)newText
into str
before the substring
specified by pat
and returns the result as
newStr
. If pat
occurs multiple times in
str
, then insertBefore
inserts text before
every occurrence of pat
.
If str
is a string array or a cell array of character vectors,
then insertBefore
inserts newText
into each
element of str
. The output argument newStr
has
the same data type as str
.
Examples
Input Arguments
Output Arguments
Extended Capabilities
Version History
Introduced in R2016b