Blog

Removing duplicate elements from a Swift array

18 Dec, 2015
Xebia Background Header Wave

Today I had to remove duplicate items from an Array while maintaining the original order. I knew there was no standard uniq function in Swift so I Googled a bit and found some implementations on StackOverflow. I found some good implementations, but wasn’t completely satisfied with any of them. So of course I tried to see if I could make something myself that I would be satisfied with.

Explore related posts