Copies the contents of one element of arrays to another, starting at deststart, setting the length of the destination array first. Note that start may be greater than the initial length of dest; dest will then be extended appropriately.
Appends an element to a list of arrays, and copies the contents of the passed source array into the new element, setting the length of the destination array first.
Resets each elements of array to its initial value.
Concatenates a list of arrays into a destination array. The function results in at most a single memory allocation, if the destination array is too small to contain the concatenation results.
Sorts array and checks if it contains at least one duplicate.
Copies the contents of one array to another, setting the length of the destination array first.
Copies the contents of src to dest, increasing dest.length if required. Since dest.length will not be decreased, dest will contain tailing garbage if src.length < dest.length.
Performs a linear scan of complete array, moving all but the first element of each consecutive group of duplicate elements to the end of the sequence. The relative order of all remaining elements will be preserved. Comparisons will be performed using the supplied predicate or '==' if none is supplied.
Moves all elements from array which match the exclusion criterum represented by exclude to the back of array so that the elements that do not match this criterium are in the front.
Sorts array and iterates over each array element that compares equal to the previous element.
Inserts elements into the middle of a buffer, maintaining the order of the existing elements by shifting them right using memmove.
Checks if T.init consists only of zero bytes so that a T[] array can be cleared by clear().
Performs a linear scan of complete array, moving all items matching element to the end of the sequence. The relative order of items not matching the matching element will be preserved. Comparisons will be performed using the supplied predicate or '==' if none is supplied.
Partitions array such that all elements that satisfy pred will be placed before the elements that do not satisfy pred. The algorithm is not required to be stable.
Removes and returns (via the 'popped' out parameter) the last element in an array. If the provided array is empty, the function returns false.
Same as select with two changes:
Performs a linear scan of complete array, removing all elements that satisfy pred from the sequence. The relative order of elements that do not satisfy pred will be preserved.
Removes elements from the middle of a buffer, maintaining the order of the remaining elements by shifting them left using memmove.
Performs a linear scan of complete array, replacing occurrences of specified element with the new element. Comparisons will be performed using the supplied predicate or '==' if none is supplied.
Performs a linear scan of the complete array, replacing elements where pred returns true.
Swaps elements of argument array so they all come in reverse order
Selects the kth element of an array as defined by the given predicate.
Shuffles the elements of array in-place.
Shuffles the elements of array in-place.
Sorts array using the supplied predicate or '<' if none is supplied. The algorithm is not required to be stable. The current implementation is based on quicksort, but uses a three-way partitioning scheme to improve performance for ranges containing duplicate values (Bentley and McIlroy, 1993).
Sorts array and removes all value duplicates.
Collection of utilities to modify arrays and buffers in-place.
All functions in this module only work on mutable arguments and modify them in place. New memory must never be allocated.
Based on tango.core.Array module from Tango library.