View Full Version : Split a string


davesmith202
10-22-2008, 01:22 AM
I want a function that takes myString like this {dogs:dog food} and splits it into 2 variables:

var1=dog food
var2=dog

But, sometimes there might only be {dog food} in myString, in which case that gets stored var1.

Any ideas how I might achieve this? It has got to cater for both potential scenarios.

Thanks,

Dave

chergh
10-22-2008, 01:33 AM
Have a look at the split function