手机
当前位置:查字典教程网 >脚本专栏 >vbs >vbs字符串分割函数
vbs字符串分割函数
摘要:复制代码代码如下:FunctionCutAndJoin(sSource,iLong,sJoiner)DimI,NN=Len(sSource)...

复制代码 代码如下:

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, "$"))

【vbs字符串分割函数】相关文章:

用vbs实现cmd功能

用vbs模拟的一个asp的分页显示功能

用vbs读取Excel文件的函数代码

文本文件分割脚本(VBS)

VBScript 常用函数总结

vbs 中调用shell.application 简单函数

vbs字符串操作小考题

用vbs得到计算机的 IP 地址

vbs向指定的文件添加内容的函数

vbs实现的支持拖动的txt文本切割器

精品推荐
分类导航