Arrays

Methods

  • array.append() Appends an array element to an array.
  • array.avg() Calculates the average of the values in an array. All elements in the array must contain values that can be automatically converted to numeric.
  • array.clear() Removes all elements from an array.
  • array.contains() Returns the position of the first element in the array that matches the item that we are searching for, or 0 if the item is not found.
  • array.containsNoCase() Returns the position of the first element in the array whose string value contains the substring passed (not case sensitive), or 0 if no such element is found.
  • array.delete() Deletes specified object from given array
  • array.deleteAt() Deletes an element from an array and resizes the array so that the deleted element doesn't leave a gap.
  • array.deleteNoCase() Deletes specified object from given array, in case of a string the case of the string does not matter.
  • array.each() call the given UDF/Closure with every value in the array.
  • array.every() This function calls a given closure/function with every element in a given array and returns true, if all of the closure calls returns true.
  • array.filter() This function creates a new Array that returns all the values from an array that match the given filter.
  • array.find() These functions searches the array for the specified object.
  • array.findAll() These functions searches the array for the specified object and return the positions of all occurrence of this values.
  • array.findAllNoCase() These functions searches the array for the specified object and return the positions of all occurrence of this values.
  • array.findNoCase() These functions performs a case-insensitive search in the array for the specified object.
  • array.first() Returns the first item from an array. Throws an error if the array is empty.
  • array.indexExists() Returns whether there exists an item in the array at the selected index.
  • array.insertAt() Inserts a value at the specified position in the array. If the element is inserted before the end of the array, Lucee shifts the positions of all elements with a higher index to make room.
  • array.isDefined() Returns whether there exists an item in the array at the selected index.
  • array.isEmpty() Determines if the array is empty.
  • array.last() Returns the last element of an array
  • array.len() Returns the length of a given array
  • array.map() Calls the given closure with every element in the given array. the function returns a array that contains all values returned by the closure.
  • array.max() Returns the largest numeric value in an array. If the array parameter value is an empty array, returns zero. All elements must contain values that can be automatically converted to numeric values.
  • array.median() Calculates the Median value of items in an array. All elements in the array must contain values that can be converted to numeric.
  • array.merge() This function creates a new array with data from the two passed arrays. To add all the data from one array into another without creating a new array see the built in function ArrayAppend(arr1, arr2, true).
  • array.mid() Extracts a sub array from a array.
  • array.min() Returns the smallest numeric value in an array. If the array parameter value is an empty array, returns zero. All elements must contain values that can be automatically converted to numeric values.
  • array.prepend() Inserts an array element at the beginning of an array and shifts the positions of the existing elements to make room.
  • array.reduce() Iterates over every entry of the given array and calls the closure with every element. This function will reduce the array to a single value and will return the value.
  • array.resize() Resets an array to a specified minimum number of elements. This can improve performance, if used to size an array to its expected maximum. For more than 500 elements, use ArrayResize immediately after using the ArrayNew tag.
  • array.reverse() Returns a new array, with all the elements reversed
  • array.set() In a one-dimensional array, sets the elements in a specified index range to a value. Useful for initializing an array after a call to ArrayNew.
  • array.slice() Returns a new array, from the start position up to the count of elements
  • array.some() This function calls a given closure/function with every element in a given array and returns true, if one of the closure calls returns true.
  • array.sort() Sorts array elements numerically or alphanumerically.
  • array.sum() The sum of values in an array. If the array parameter value is an empty array, returns zero.
  • array.swap() Swaps array values of an array at specified positions. This function is more efficient than multiple cfset tags
  • array.toList() Transform the array to a list of elements delimiter by the given string
  • array.toStruct() Transform the array to a struct, the index of the array is the key of the struct
  • query.columnArray() return the column names as array
  • string.listReduce() Iterates over every entry of the given array and calls the closure with every element. This function will reduce the array to a single value and will return the value.
  • string.listSome() This function calls a given closure/function with every element in a given string list and returns true, if one of the closure calls returns true.
  • string.listToArray() Copies the elements of a list to an array.

Objects

Functions

  • Array Creates a new array
  • ArrayAppend Appends an array element to an array.
  • ArrayAvg Calculates the average of the values in an array. All elements in the array must contain values that can be automatically converted to numeric.
  • ArrayClear Removes all elements from an array.
  • ArrayContains Returns the position of the first element in the array that matches the item that we are searching for, or 0 if the item is not found.
  • ArrayContainsNoCase Returns the position of the first element in the array whose string value contains the substring passed (not case sensitive), or 0 if no such element is found.
  • ArrayDelete Deletes specified object from given array
  • ArrayDeleteAt Deletes an element from an array and resizes the array so that the deleted element doesn't leave a gap.
  • arraydeletenocase Deletes specified object from given array, in case of a string the case of the string does not matter.
  • ArrayEach call the given UDF/Closure with every value in the array.
  • ArrayEvery This function calls a given closure/function with every element in a given array and returns true, if all of the closure calls returns true.
  • ArrayFilter This function creates a new Array that returns all the values from an array that match the given filter.
  • ArrayFind These functions searches the array for the specified object.
  • ArrayFindAll These functions searches the array for the specified object and return the positions of all occurrence of this values.
  • ArrayFindAllNoCase These functions searches the array for the specified object and return the positions of all occurrence of this values.
  • ArrayFindNoCase These functions performs a case-insensitive search in the array for the specified object.
  • ArrayFirst Returns the first item from an array. Throws an error if the array is empty.
  • ArrayIndexExists Returns whether there exists an item in the array at the selected index.
  • ArrayInsertAt Inserts a value at the specified position in the array. If the element is inserted before the end of the array, Lucee shifts the positions of all elements with a higher index to make room.
  • ArrayIsDefined Returns whether there exists an item in the array at the selected index.
  • ArrayIsEmpty Determines if the array is empty.
  • ArrayLast Returns the last element of an array
  • ArrayLen Returns the length of a given array
  • ArrayMap Calls the given closure with every element in the given array. the function returns a array that contains all values returned by the closure.
  • ArrayMax Returns the largest numeric value in an array. If the array parameter value is an empty array, returns zero. All elements must contain values that can be automatically converted to numeric values.
  • ArrayMerge This function creates a new array with data from the two passed arrays. To add all the data from one array into another without creating a new array see the built in function ArrayAppend(arr1, arr2, true).
  • ArrayMid Extracts a sub array from a array.
  • ArrayMin Returns the smallest numeric value in an array. If the array parameter value is an empty array, returns zero. All elements must contain values that can be automatically converted to numeric values.
  • ArrayNew create a new array
  • ArrayPrepend Inserts an array element at the beginning of an array and shifts the positions of the existing elements to make room.
  • ArrayReduce Iterates over every entry of the given array and calls the closure with every element. This function will reduce the array to a single value and will return the value.
  • ArrayResize Resets an array to a specified minimum number of elements. This can improve performance, if used to size an array to its expected maximum. For more than 500 elements, use ArrayResize immediately after using the ArrayNew tag.
  • ArrayReverse Returns a new array, with all the elements reversed
  • ArraySet In a one-dimensional array, sets the elements in a specified index range to a value. Useful for initializing an array after a call to ArrayNew.
  • ArraySlice Returns a new array, from the start position up to the count of elements
  • ArraySome This function calls a given closure/function with every element in a given array and returns true, if one of the closure calls returns true.
  • ArraySort Sorts array elements numerically or alphanumerically.
  • ArraySum The sum of values in an array. If the array parameter value is an empty array, returns zero.
  • ArraySwap Swaps array values of an array at specified positions. This function is more efficient than multiple cfset tags
  • ArrayToList Transform the array to a list of elements delimiter by the given string
  • ArrayToStruct Transform the array to a struct, the index of the array is the key of the struct
  • IsArray Determines whether a value is an array. True, if value is an array, a query column object, or xml. also number = Dimension; function tests whether the array has exactly this dimension
  • IsValid Tests whether a value meets a validation or data type rule.
  • ListReduce Iterates over every entry of the given array and calls the closure with every element. This function will reduce the array to a single value and will return the value.
  • ListSome This function calls a given closure/function with every element in a given string list and returns true, if one of the closure calls returns true.
  • ListToArray Copies the elements of a list to an array.
  • QueryColumnArray return the column names as array