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