I have an NSSet of Strings, and I want to convert it into [String]. How do I do that?
If you have a Set, you can use the Array constructor:
let set: Set = // ...
let strings = Array(set)
Or if you have NSSet, there are a few different options:
let set: NSSet = // ...
let strings1 = set.allObjects as? [String] // or as!
let strings2 = Array(set as! Set)
let strings3 = (set as? Set).map(Array.init)