level 9
截取字符串:
Dim s As String = "123456"
Dim result As String = s.subString(0,3) '//0是起始位置,3是长度
'//
result= "123"
2012年03月24日 14点03分
2
level 7
谢谢十分感谢,
再麻烦问一下Endswith函数的用处是只能比较两个字串符最后一个元素一样吗
谢谢了
2012年03月24日 14点03分
3
level 9
不是,
Dim s As String = "123456"
If s.EndsWith("6") Then
Debug.WriteLine("该字符串以6结束.")
Else
Debug.WriteLine("该字符串不是以6结束.")
End If
2012年03月24日 14点03分
4