声明:本空间的内容不全部是原创,如有雷同只为学习与借鉴之方便,别无它意,来者是朋友,愿通过此平台结交天下测试达狼!

支付宝面试题(原创)

上一篇 / 下一篇  2014-03-29 13:56:11 / 个人分类:QTP

1从字符串中分离" http://www.163.com/index.html"出“www.163.com”
 
Dim a51Testing软件测试网 c;_J9C1d;Q#R2c
a="http://www.163.com/index.html"51Testing软件测试网GT2G AG&`a].b
b=split (a, "/",-1,1)51Testing软件测试网$bbP [1s}
msgbox b(3)&" " &b(2)51Testing软件测试网"b ?;D7z+h&E%V,_
2 输入任意一个字符串然后把它倒序显示出来
 
Dim str1,str2,str1l51Testing软件测试网+iO*P"`Emb l(UD%Vc
str1= InputBox("Enter a string","Enter your name:") 51Testing软件测试网p+jJ ~aJ G5?
MsgBox ("You entered: " & str1)
@2`n,v/G MV7t y0str1l=len(str1)51Testing软件测试网\%T5CH6QVqoc@
msgbox str1l-151Testing软件测试网5H6U5j_dR)UZ u
reDim str2(str1l-1)51Testing软件测试网pu^#`!lC Pl G
Dim i51Testing软件测试网.FvW9a _+Gx
i=str1l-1
hjRg B0while(i>=0)
/XtB F c x l7Q![0str2(i)=mid(str1,str1l-i,1)
W-]HO0v0i=i-151Testing软件测试网i7Faw~.i,z/W6S3uQ-HP
wend51Testing软件测试网 mh;wK4{os.Z$K
msgbox join (str2) ' gnij ieb ot  emoclew

TAG:

 

评分:0

我来说两句

Open Toolbar