Ballerina API Documentation

Functions of ballerina.util.arrays package

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

Concatenate elements of an string array using a delimiter.

Parameters:

Parameter NameData TypeDescription
arrstring[]string array to be concatenated
delimiterstringdelimiter which should be used in the concatenation

Return Parameters:

Return VariableData TypeDescription
stringstring: concatenated string

public 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

public 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

public 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
    • concat(string[] arr, string delimiter) (string )
    • 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