<%
' Dim a
' a = "Help Me! Trapped in computer"
' Response.Write AddChr(a, ", can't get out", Len(a)) & "
"
' returns: "Help Me! Trapped in computer, can't get out"
Private Function AddChr(byVal string, byVal addition, byVal location)
Dim leftString, rightString
On Error Resume Next
leftString = Left(string, location)
If Err Then
leftString = ""
location = 0
End If
rightString = Mid(string, location + 1)
AddChr = leftString & addition & rightString
On Error GoTo 0
End Function
Nenhum comentário:
Postar um comentário