 |
|
BaselScript |
Beschreibung
Array functions
Get min element in array
#min = $array.get_min (#array)
Example:
#array = { 1,2,5,6,7}
#min = 1
Get max element in array
#max = $array.get_max(#array)
Example:
#array = { 1,2,5,6,7}
#max = 7
Get sum of all elements in array
#sum = $array.get_sum(#array)
Example:
#array = { 1,2,5,6,7}
#sum= 28
Get length of array
#length = $array.length(#array)
Example:
#string ="It.is.split.test"
#array = $split(#string,".")
#length = 4
Get index of element
#index= $array.get_index(#array, #value)
Example:
#array = 1,2,5,6,7
#index = 2
Get number of substrings in array
#number= $array.get_number_of_substring(#array, #substring)
Example:
#array = 01,02,05,06,07,9,7,7,3
#substring =0
Result: #number = 5
Get number of string in array
#number = $array.get_number_of_string(#array, #string)
Example:
#array = 1,2,5,6,07,9,7,07,3,7,7,6
#string=07
Result: #number = 2
Array comparison
#result = $array.arrays_are_equell(#array1,#array2, length)
Example:
#array1 = 1,2,5,6
#array2 = 1,2,6,5
Result: 0
Add element
#result =array.add_in_array(#array1,#value)
Example:
#array1 = 1,2,5,6
#value=8
Result: #array1 = 1,2,5,6,8
Warning: getimagesize(screens/17_5_1_landscape.jpg): failed to open stream: No such file or directory in /var/www/web144706/html/baselscript/docu.php on line 496