版权声明 关于本站 在线留言 登陆管理 个人博客 |
『辰桦网络』. All Rights Reserved Station construction time: on April 4, 2006 |
编写一个字符串反转函数invert,如b=“abcde”,则invert(b)等于“edcba”
Function invert(s As Integer) As String
Dim k, slen As Integer
Dim newstr As String
newstr = ""
slen = Len(s)
For k = slen To 1 Step -1
newstr = newstr + Mid(s, k, 1)
Next k
invert = newstr
End Function