ballerina.util.arrays package

public function concat ( string[] arr , string delimiter ) ( string )

Concatenate elements of an string array using a delimiter.

Parameter Name Data Type Description
arr string[] string array to be concatenated
delimiter string delimiter which should be used in the concatenation

public function copyOf ( any anyArrayFrom , any anyArrayTo ) ( int )

Copies the specified any array

Parameter Name Data Type Description
anyArrayFrom any The from array to be copied
anyArrayTo any The to array to which to copy to

public function copyOfRange ( any anyArrayFrom , any anyArrayTo , int from , int to ) ( int )

Copies the specified range of the specified string array

Parameter Name Data Type Description
anyArrayFrom any The any array from which the range will be copied
anyArrayTo any The any array to which the range will be copied
from int The initial index of the range
to int The final index of the range

public function sort ( string[] arr ) ( string[] )

Sorts the specified string array

Parameter Name Data Type Description
arr string[] The string array to be sorted