当前位置:编程学习 > VB >>

VB简单截取字符串

补充:http://zhidao.zhaoxi.net/question/26970330.html 比如 我只要截取左边的 http://zhidao.zhaoxi.net/question
其他:用Left、Right、Mid等函数可以对字符串进行截取,例如:
s = "http://zhidao.zhaoxi.net/question/26970330.html"
a = Left(s, 32)
MsgBox a 比如
left(http://zhidao.zhaoxi.net/question,4)
结果
"http" 楼上都不具有通用性

Private Sub Command1_Click()
a = 地址
MsgBox Left(a, InStrRev(a, "/") - 1)
End Sub

上一个:VB最小化退出后程序出错
下一个:VB2008多次判断If条件

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,