uniq_array.c

final_realms_fluffos_v1/lib/secure/simul_efun/uniq_array.c · 342 B

From the archive final_realms_fluffos_v1.zip

Download the archive   « Back to the archive contents

//      /secure/simul_efun/uniq_array.c
//      from the RotD Mudlib
//      takes any array and returns an array with no repeat members
//      created by Descartes of Borg 930822

mixed *uniq_array(mixed *arr) {
    mapping borg;
    int i;
  
    i = sizeof(arr);
    borg = ([]);
    while(i--) borg[arr[i]] = 1;
    return keys(borg);
}

Site Stats

Snippets: 1791
Codebases: 571