PDA

View Full Version : split string into two variables


JustAsking
11-20-2002, 05:21 AM
I was wondering if there is a way to split this string into two variables:

environment/glossary.htm

so that I can get:

variable1 = "environment"

variable2 = "glossary.htm

Algorithm
11-20-2002, 05:26 AM
var stuff = "environment/glossary.htm";
var SplitStuff = stuff.split('/');

// SplitStuff[0] equals "environment"
// SplitStuff[1] equals "glossary.htm"