Insert strings before specified substrings
inserts newStr
= insertBefore(str
,endStr
,newText
)newText
into str
before
the substring specified by endStr
and returns the
result as newStr
. If endStr
occurs
multiple times in str
, then insertBefore
inserts
text before every occurrence of endStr
.
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
.
erase
| eraseBetween
| extractAfter
| extractBefore
| insertAfter
| join
| split