Delete substrings between start and end points
deletes
all characters from newStr
= eraseBetween(str
,startStr
,endStr
)str
that occur between the
substrings startStr
and endStr
,
but does not delete startStr
and endStr
themselves. eraseBetween
returns
the remaining text as newStr
.
If str
is a string array or a cell array
of character vectors, then eraseBetween
deletes
characters from each element of str
. The output
argument newStr
has the same data type as str
.
forces
the starts and ends specified in any of the previous syntaxes to be
either inclusive or exclusive. They are inclusive when newStr
= eraseBetween(___,'Boundaries',bounds)bounds
is 'inclusive'
,
and exclusive when bounds
is 'exclusive'
.
For example, eraseBetween(str,startStr,endStr,'Boundaries','inclusive')
deletes startStr
, endStr
,
and all the text between them.
count
| erase
| extractAfter
| extractBefore
| extractBetween
| insertAfter
| insertBefore
| join
| replace
| replaceBetween
| size
| split
| strlength