swift 判断一个数组是否包含另一个数组中的元素 指尖的暖 2021-03-22 1,482 阅读1分钟 `import UIKit var str = "Hello, playground" let array = ["a", "b", "c"] let temparray = ["a","d"] if array.contains(where: { (tiem) -> Bool in temparray.contains(tiem) }) { print(true) }else { print(false) } `