Ballerina API Documentation

Functions of ballerina.lang.arrays package

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

Copies the specified any array

Parameters:

Parameter NameData TypeDescription
anyArrayFromanyThe from array to be copied
anyArrayToanyThe to array to which to copy to

Return Parameters:

Return VariableData TypeDescription
intNumber 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 NameData TypeDescription
anyArrayFromanyThe any array from which the range will be copied
anyArrayToanyThe any array to which the range will be copied
fromintThe initial index of the range
tointThe final index of the range

Return Parameters:

Return VariableData TypeDescription
intNumber of elements copied

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

Sorts the specified string array

Parameters:

Parameter NameData TypeDescription
arrstring[]The string array to be sorted

Return Parameters:

Return VariableData TypeDescription
string[]string[]): The sorted array


Menu

  • Functions
    • copyOf(any anyArrayFrom, any anyArrayTo) (int )
    • copyOfRange(any anyArrayFrom, any anyArrayTo, int from, int to) (int )
    • sort(string[] arr) (string[] )

Copyright 2017 Ballerina API Documentation