考虑以下数组
let a = [1,2,3,4,5,6]
let b = [5,6,7,8,9]
如何获取 c,其中 c = [1,2,3,4,5,6,7,8,9]
?
RxSwift中如何对输入数组进行归并、排序、去重?
最佳答案
核心库提供了您需要的一切:
let c = Set(a + b).sorted()
关于swift - RxSwift - 数组合并、排序、删除重复项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41508221/