Possible Duplicate:
First split then join a subset of a string
I'm trying to split a string into an array, take first element out (use it) and then join the rest of the array into a seperate string.
Example:
theString = "Some Very Large String Here"
Would become:
theArray = [ "Some", "Very", "Large", "String", "Here" ]
Then I want to set the first element in a variable and use it later on.
Then I want to join the rest of the array into a new string.
So it would become:
firstElem = "Some";
restOfArray = "Very Large String Here"
I know I can use theArray[0]
for the first element, but how would I concatinate the rest of the array to a new string?