首页 相关文章 VB5里面实现VB6的InstrRev()和Split()一样的替换函数

VB5里面实现VB6的InstrRev()和Split()一样的替换函数

  

Private Function split_vb5(ByVal sstr As String, spstr As String) As VariantDim starstr, lenstr, cur As IntegerDim backstr() As Stringstarstr = InStr(sstr, spstr)cur = starstr + 1lenstr = Len(sstr)ReDim backstr(0)backstr(0) = Left(sstr, starstr - 1)For x = starstr + 1 To lenstr  If Mid(sstr, x, 1) = spstr Then    ReDim Preserve backstr(UBound(backstr) + 1)    backstr(UBound(backstr)) = Mid(sstr, cur, x - cur)    cur = x + 1    Debug.Print backstr(UBound(backstr))  End IfNextsplit_vb5 = backstr()End Function

...[ 查看全文 ]

2016-02-19 标签:

VB5里面实现VB6的InstrRev()和Split()一样的替换函数的相关文章

手机页面
收藏网站 回到头部