📜  从数组中快速删除 - Swift 代码示例

📅  最后修改于: 2022-03-11 15:01:00.184000             🧑  作者: Mango

代码示例1
var elements = ["String", "String2", "String3"];
let element = elements.remove(at: 1) // Removes and returns the element at index 1
let first = elements.removeFirst() // Removes and returns the first element
let last = elements.removeLast() // Removes and returns the last element
elements.removeAll() // Removes all elements