pike.ida.liu.se
Search for
Home > Docs > Pike reference

[Top]
Array

Array.uniq()


Method uniq

array uniq(array a)

Description

Remove elements that are duplicates.

Returns

This function returns an copy of the array a with all duplicate values removed. The order of the values is kept in the result; it's always the first of several equal elements that is kept.

Note

Elements are compared with `== . They are also hashed (see lfun::__hash for further details if the array contains objects).

Module reference for Pike v7.8 release 116, 2008-12-31