google搜索 站内搜索                 软件测试门户 | 软件测试培训 | 文章资料精选 | 软件测试论坛 | 测试解决方案 | 软件测试博客 | 测试招聘求职 
打印

[讨论] 关于字符串的问题

关于字符串的问题


本人涉及到字符串包含的问题,即判断一个字符串是否包含另一个字符串或字母,请高手指教具体的代码!!
以下是我的错误代码,在此仅供抛砖引玉,望高手不吝赐教!!

Dim StrA
Dim StrB
Dim StrC

StrA = "Jason"
StrB = "Serena"
StrC = "o"

If StrA >= StrC Then
        Reporter.ReportEvent 0, StrA, "contains" & " " & StrC
Else
        Reporter.ReportEvent 1, StrA, "doesn't contain" & " " & StrC
End If

If StrB >= StrC Then
        Reporter.ReportEvent 0, StrB, "contains" & " " & StrC
Else
        Reporter.ReportEvent 1, StrB, "doesn't contain" & " " & StrC
End If

TOP

用函数instr()

TOP

Thank You~~

TOP

 
当前时区 GMT+8, 现在时间是 2008-12-5 23:36Copyright(C)上海博为峰软件技术有限公司 2001-2007 电话:021-64471599-8017
当您在访问网站、论坛及博客过程中遇到问题时可发送email:webmaster@51testing.com或发送论坛短信至管理员风在吹