"Sputnik" help  
Sputnik Help
BinaryJoin(<value/s>, [<separator>], [<start>],<[count]>)


Joins multiple binary strings into a single binary string, optionally separated by a specified separator.


<value/s> The binary string(s) to be joined. It can be a single binary string or an array of binary strings.
<separator> Optional separator to be inserted between each value. It defaults to an empty binary string.
<start> Optional starting index from which the values should be joined. It determines the position in the value/s array to start joining. It defaults to 0.
<count> Optional number of values to include in the join operation, starting from the start index. It defaults to the total number of values in the values array.

Return Value

Success: Returns the joined binary string containing the concatenated values.
Failure: Returns an empty binary string.


If the value/s parameter is an array, all elements of the array will be converted to binary strings and joined together.
The start parameter allows you to specify the starting index from which the values should be joined. Values before the start index will be excluded from the joining process.
The count parameter determines the number of values to include in the join operation. If the count is greater than the available values, it will be adjusted to the maximum available values.
The resulting binary string will not contain the separator at the beginning or end.
If any of the input parameters are null or empty, the function will return an empty binary string.


BinaryAppend, BinaryConcat


Example of usage:

$a = BinaryJoin("Cat");
say $a;
$a = BinaryJoin("Cat", "-");
say $a;
$a = BinaryJoin(array("Cat", "Dog", "Fox"), "-");
say $a;
$a = BinaryJoin(array("Cat", "Dog", "Fox"), "-", 1, 2);
say $a;
$a = BinaryJoin(array("Cat", "Dog", "Fox"), "-", 1, 1);
say $a;
$a = BinaryJoin(array("Cat", "Dog", "Fox"), "-", 2, 1);
say $a;

// Cat
// Cat
// Cat-Dog-Fox
// Dog-Fox
// Dog
// Fox


Cheryl (uberfox@hotmail.com)