|
-
Feb 9th, 2004, 06:41 PM
#1
Thread Starter
Hyperactive Member
Javascript equiv to Join, Split
I have a comma delimited string. I want to put in array, and then back to comma delimited string later. Can someone give me an example please?
thx in advance.
-
Feb 10th, 2004, 04:00 AM
#2
the String object has a split([separator][, limit])
method.
limit is a limit on the number of splits to be found.
-
Feb 10th, 2004, 04:32 AM
#3
Frenzied Member
I'm pretty sure join() exists too, but I'm not sure on the parameters.
Have I helped you? Please Rate my posts. 
-
Feb 10th, 2004, 04:38 AM
#4
Frenzied Member
her it is:
join([deliminator])
where deliminator default is a comma. so
myString = myArray.join()
should get the whole array back into a string seperated by a comma.
Have I helped you? Please Rate my posts. 
-
Feb 10th, 2004, 09:21 AM
#5
Thread Starter
Hyperactive Member
Thanks guys. I was expecting to have to write some loop with lots of parsing, but I guess that java guys did good 
thx again.
-
Feb 10th, 2004, 10:18 AM
#6
Frenzied Member
heh, java != JavaScript, there's already a big thread going on about this.
JavaScript guys did good.
Have I helped you? Please Rate my posts. 
-
Feb 10th, 2004, 10:21 AM
#7
Thread Starter
Hyperactive Member
Yeah, I think we are all aware of that. I don't really know to many of the differences though. That's what forums are for 
thx for helping.
'sneed
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|