var numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9]
numbers.removeAll()
print(numbers) // []
var numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9]
numbers.removeAll()
print(numbers) // []
本文标题:Swift_集合 arr.removeAll(),清空所有元素
本文链接:https://www.haomeiwen.com/subject/ikfdnktx.html
网友评论