vb中文版中取一个数组的两边的子数组串的函数是什么,类似mid函数的反函数,在vb中怎么定义的?怎么求出一个串的两边构成子串的?
https://zhidao.baidu.com/question/561032689.html
Public Function RevMid(Byval Str As String, Byval iStart as Integer, Byval iEnd as Integer) as String
Dim s1 as String, s2 as String
If iStart > iEnd Then
'处理参数不对的情况,你可以按你的思路来处理,这里只是简单的返回
Exit Function
End If
If iStart >1 Then s1=Left$(Str, iStart - 1)
s2=Mid$(Str, iEnd +1)
RevMid = s1 & s2
End Function
或者象下面这样:
Public Function RevMid(Byval Str As String, Byval iStart As Integer, Byval iLength As Integer) As String
RevMid=Replace$(iStart, Str, Mid$(Str, iStart, iLength), "", 1)
End Function