Dim intLength As Integer
intLength = Microsoft.VisualBasic.Len(strPath)
Dim strEnd As String = Microsoft.VisualBasic.Right(strPath, 1)
If strEnd = "\" Then
strPath = Microsoft.VisualBasic.Left(strPath, intLength - 1)
End If
If strPath.EndsWith(System.IO.Path.DirectorySeperatorChar) = True Then strPath = strPath.SubString(0, strPath.Length - 2)
I want to do a test on whether a string's last character is "\"
keep in mind I only want to strip off the last \ not all of them
you dont use backslashes in URLs; theyre illegal characters!
Click Start
Click Run
Type C:\\\\\\\\\\\\\\\\windows
Watch it not complain