Delete substrings within strings
newStr = erase(
deletes all occurrences of str
,match
)match
in str
. The
erase
function returns the remaining text as
newStr
.
If match
is a string array or a cell array
of character vectors, then erase
deletes every
occurrence of every element of match
in str
.
The str
and match
arguments
do not need to be the same size.
To delete multiple occurrences of a match when the
occurrences overlap, use the strrep
function. erase
only
deletes the first occurrence when occurrences overlap.
count
| eraseBetween
| extractAfter
| extractBefore
| extractBetween
| insertAfter
| insertBefore
| join
| pad
| replace
| replaceBetween
| size
| split
| strlength
| strsplit