基本上我需要一个版本appendContentsOf:不附加重复元素.
appendContentsOf:
例
var a = [1, 2, 3] let b = [3, 4, 5] a.mergeElements(b) //gives a = [1, 2, 3, 4, 5] //order does not matter
arrays swift swift2
arrays ×1
swift ×1
swift2 ×1