removeAll(keepingCapacity:)
Removes all elements from the array.
Declaration
mutating func removeAll(keepingCapacity keepCapacity: Bool = false)Parameters
- keepCapacity:
Pass
trueto keep the existing capacity of the array after removing its elements. The default value isfalse.