Core Function Join
From Sputnik Wiki
Join( <array>, <separator> )
Contents |
Description
Join an array into a string with an optional separator.
Parameters
array
The array to join.
separator
Optional; A string to place between each array element.
Return Value
Success - The array merged into a string. Failure - Returns the separator.
Remarks
This does not alter the original array.
Example
$days = Split("Sun,Mon,Tue,Wed,Thu,Fri,Sat", ",") For $day In $days println("Element is: " . $day) Next println("Back together is " . join($days, ":") )
Heres another way of writing it
$days = Split("Sun,Mon,Tue,Wed,Thu,Fri,Sat", ",") For $day In $days println("Element is: " . $day) Next println("Back together is " . $days::join(":") )
Note the :: this will allow a function to be called using the variable its attached to becomes the first param.