matlab.unittest.constraints.StartsWithSubstring 类
命名空间: matlab.unittest.constraints
超类: matlab.unittest.constraints.BooleanConstraint
测试值是否以指定的字符串开头
描述
matlab.unittest.constraints.StartsWithSubstring
类提供一个约束来测试值是否以指定的字符串开头。
创建对象
描述
c = matlab.unittest.constraints.StartsWithSubstring(
创建一个约束来测试值是否以指定的字符串开头。以 prefix
)prefix
开头的字符串标量或字符向量满足该约束。
c = matlab.unittest.constraints.StartsWithSubstring(
使用一个或多个名称-值参量设置其他选项。例如,prefix
,Name,Value
)c = matlab.unittest.constraints.StartsWithSubstring(prefix,"IgnoringCase",true)
创建一个不区分大小写的约束。
输入参量
属性
示例
版本历史记录
在 R2013a 中推出