Sorts array and removes all value duplicates.
Template params: T = type of array element sort = true: do array.sort first; false: array is already sorted
array to clean from duplicate values
result
int[] arr = [ 42, 43, 43, 42, 2 ]; auto slice = uniq(arr); test!("==")(slice, [ 2, 42, 43 ]); test!("==")(arr, [ 2, 42, 43, 43, 43 ]);
See Implementation
Sorts array and removes all value duplicates.
Template params: T = type of array element sort = true: do array.sort first; false: array is already sorted