matlab.unittest.constraints.ContainsSubstring 类
命名空间: matlab.unittest.constraints
超类: matlab.unittest.constraints.BooleanConstraint
测试值是否包含指定的字符串
描述
matlab.unittest.constraints.ContainsSubstring
类提供一个约束来测试值是否包含指定的字符串。
创建对象
描述
c = matlab.unittest.constraints.ContainsSubstring(
创建一个约束来测试值是否包含指定的字符串。包含 substring
)substring
的字符串标量或字符向量满足该约束。
c = matlab.unittest.constraints.ContainsSubstring(
使用一个或多个名称-值参量设置其他选项。例如,substring
,Name,Value
)c = matlab.unittest.constraints.ContainsSubstring(substring,"IgnoringCase",true)
创建一个不区分大小写的约束。