- I would like to be able to split a string using a String (more than
one character long) separator.
split("John:Arthur::Renaud:Sylvan::me:you", "::") ->[ "John;Arthur",
"Renaud:Sylvan", "me:you" ]

- I would like to fastly join and quote at the same time :
join(["me", "you", "them"], "|", "<", ">") -> "<me>|<you>|<them>"
basically, I would usually use it to turn an array into some
javascript or sql list :
join( ["me", "you", "them"], ", ", "'", "'") -> "'me', 'you', 'them'" 
and then "select * from guys where name in (" + ... + ")". Idem with
generating some javascript to a jsp.

- then split such a quoted string back to an array.
split("'me', 'you', 'them'", ", ", "'", "'") -> ["me", "you", "them"]


(I know I can do all of this with regexp, or a bit of work, but the
question is always can i do it with one line :) --- ** lazy !! **)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to