singular_array.c

ds2.1.1/lib/secure/sefun/singular_array.c · 169 B

From the archive ds2.1.1.zip

Download the archive   « Back to the archive contents

mixed *singular_array(mixed *arr) {
    mixed *ret = ({});

    foreach(mixed item in arr){
	if(member_array(item, ret) == -1) ret += ({item});
    }

    return ret;
}

Site Stats

Snippets: 1791
Codebases: 571