Instance Methodswift 6.0.3Swift

removeAll(keepingCapacity:)

Removes all elements from the array.

mutating func removeAll(keepingCapacity keepCapacity: Bool = false)

Parameters

keepCapacity

Pass true to keep the existing capacity of the array after removing its elements. The default value is false.