eraseBetween
Delete substring between start and end points
Syntax
Description
deletes all characters from newStr
= eraseBetween(str
,startPat
,endPat
)str
that occur between the substrings
startPat
and endPat
, but does not delete
startPat
and endPat
themselves.
eraseBetween
returns the remaining text as
newStr
.
deletes all characters from newStr
= eraseBetween(str
,startPos
,endPos
)str
that occur between the positions
startPos
and endPos
, including the characters at
those positions.
forces the starts and ends specified in any of the previous syntaxes to be either inclusive
when newStr
= eraseBetween(___,Boundaries=bounds)bounds
is "inclusive"
, and exclusive when
bounds
is "exclusive"
. For example,
eraseBetween(str,startPat,endPat,Boundaries="inclusive")
deletes
startPat
, endPat
, and all the text between
them.
Note
Only Stateflow® charts that use MATLAB® as the action language support the eraseBetween
operator.
Examples
Limitations
This operator does not support structures. For more information about structures in Stateflow, see Access Bus Signals Through Stateflow Structures.