Merge two string
Posted: Wed Jul 01, 2009 12:29 am
Can someone point me in the right direction for merging 2 separate strings?
Say I have the following strings:
C:\Users\myuser\department\file.txt
Z:\shared\
And I want to get the following:
Z:\shared\department\file.txt
Essentially I want to find "department" in the first string and append everything from the start of that point to the second string.
Hopefully this makes sense. In vb.net I would just run an InStr() function to return an integer where department starts. Then I could use the Mid() function to extract that exact portion of the string.
Thanks in advance!
Say I have the following strings:
C:\Users\myuser\department\file.txt
Z:\shared\
And I want to get the following:
Z:\shared\department\file.txt
Essentially I want to find "department" in the first string and append everything from the start of that point to the second string.
Hopefully this makes sense. In vb.net I would just run an InStr() function to return an integer where department starts. Then I could use the Mid() function to extract that exact portion of the string.
Thanks in advance!