vbs字符串分割函数
导读:收集整理的这篇文章主要介绍了vbs字符串分割函数,觉得挺不错的,现在分享给大家,也给大家做个参考。 复制代码 代码如下:Function CutAndJoin(sSource, iLon...
收集整理的这篇文章主要介绍了vbs字符串分割函数,觉得挺不错的,现在分享给大家,也给大家做个参考。 复制代码 代码如下:Function CutAndJoin(sSource, iLong, sJoiner)
Dim I, N
N = Len(sSource) / iLong
If(N > Fix(N))Then N = Fix(N) + 1
For I = 0 To N - 1
CutAndJoin = CutAndJoin & Mid(sSource, I * iLong + 1, iLong) & sJoiner
Next
If(N > 0)Then CutAndJoin = Left(CutAndJoin, Len(CutAndJoin) - Len(sJoiner))
End Function
WScript.Echo(CutAndJoin("hello world!", 1, "$"))
声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!
若转载请注明出处: vbs字符串分割函数
本文地址: https://pptw.com/jishu/609852.html
