micropathic Posted February 13, 2004 Posted February 13, 2004 How can I subtract one string from another in vb .net? For instance: if I have the string: "C:\Windows\Subdir1\Subdir2\Subdir3" and another string like: "C:\Windows\Subdir1" How can I return the remaining text "\Subdir2\Subdir3" Thanks in advance for any help! Quote
Leaders dynamic_sysop Posted February 13, 2004 Leaders Posted February 13, 2004 one way would be to use the inbuilt Replace function of a string... Dim s1 As String = "C:\Windows\Subdir1\Subdir2\Subdir3" Dim s2 As String = s1.Replace("C:\Windows\Subdir1" , "") Quote
micropathic Posted February 13, 2004 Author Posted February 13, 2004 Thanks that's exactly what I was looking for! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.