手脚腋下多汗怎么治疗:VB如何获取截取一段字符串?

来源:百度文库 编辑:神马品牌网 时间:2024/05/09 10:09:42
VB如何获取截取一段字符串?

例如 2225541121354654.gif

我只想获得文件的后缀名,文件名不要,就要".gif"

请问如何截取?
呵呵,对不起 我刚学VB不久,烦请各位讲详细一些,谢谢

private sub Command1_click()
dim s as string,temp as string
s=text1.text
s=Cstr(s)
temp=mid(s,instr(s,"."))
print temp
end sub

你看看这个是不是你想要的.

一般先用indexOf获得.的位置
然后再用substring来获得刚才位置之后的东西

使用函数