Question : string manipulation

Hi

I have to check a string from instance of a comma, and if it exists split out the 2 values

i.e.  the string will contain either one or two URLS:
http://myurl.com/test.xml, http://myurl.com/test2.xml

if a comma exists, i need to split these 2 out and assign to variables

Can some one give me the VB code for this please

Answer : string manipulation

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
strInput = "url,url2"

If InStr(strInput,",") Then
'split string and put into array
sTheInputString = "val1,val2"
aLineArray=split(sTheInputString ,",")

sURL1 = aLineArray(0)
sURL2 = aLineArray(1)
Else
'comma Not Found
End If
Random Solutions  
 
programming4us programming4us