array.unique [method]
array.unique( bool strconv = false )
returns an array without duplicates, where a duplicate is a strictly equal variable or a string conversion match
- if
strconv
is true, items are converted to strings before comparison
a = [ 5, 3, 2, 3, 2, "3" ]; a.unique(); // returns [5,3,2,"3"] a.unique( true ); // returns [5,3,2]