StartsWith
返回一个逻辑值,用来判断字符串是否以给定的子字符串开头。
语法:
StartsWith(Value)
Value:给定的子字符串,判断是否以该子字符串开头。
示例:
Dim
Country As
String ="中华人民共和国"
Dim Val1
As
Boolean
Dim Val2
As
Boolean
Val1 = Country.StartsWith("中华")
Val2 = Country.StartsWith("中国")
Output.Show("Val1: " &
Val1)
Output.Show("Val2: " &
Val2)
在命令窗口执行后,会显示:
Val1: True
Val2: False