Functions of ballerina.lang.arrays package
function copyOf(any anyArrayFrom, any anyArrayTo) (int )
Copies the specified any array
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
anyArrayFrom | any | The from array to be copied |
anyArrayTo | any | The to array to which to copy to |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
int | Number of elements copied |
function copyOfRange(any anyArrayFrom, any anyArrayTo, int from, int to) (int )
Copies the specified range of the specified string array
Parameters:
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 |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
int | Number of elements copied |
function sort(string[] arr) (string[] )
Sorts the specified string array
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
arr | string[] | The string array to be sorted |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
string[] | string[]): The sorted array |