Insert strings before specified substrings
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
.
count
| erase
| extract
| insertAfter
| join
| pattern
| replace
| split
| textBoundary
| wildcardPattern