matlab.unittest.constraints.IsSubstringOf Class
Namespace: matlab.unittest.constraints
Superclasses: matlab.unittest.constraints.BooleanConstraint
Test if value is substring of specified string
Description
The matlab.unittest.constraints.IsSubstringOf
class provides a constraint
to test if a value is a substring of a specified string.
Creation
Description
c = matlab.unittest.constraints.IsSubstringOf(
creates a constraint to test if a value is a substring of the specified string. The
constraint is satisfied by a string scalar or character vector that occurs in
superstring
)superstring
.
c = matlab.unittest.constraints.IsSubstringOf(
sets additional options using one or more name-value arguments. For example, superstring
,Name,Value
)c =
matlab.unittest.constraints.IsSubstringOf(superstring,"IgnoringCase",true)
creates a constraint that is insensitive to case.