Array
extension Array
extension Array where Element: Equatable
                - 
                  
                  
Returns an Array adding the a new element at the end.
Declaration
Swift
public func appending(_ newElement: Element) -> [Element]Parameters
newElementThe element to append to the Array.
Return Value
An Array with the added element at the end.
 - 
                  
                  
Returns the Array removing the element at the specified index.
Declaration
Swift
public func removing(at index: Int) -> [Element]Parameters
indexThe index of the element to remove from the Array.
Return Value
An Array with the element in the specified index removed.
 - 
                  
                  
Moves an element at the specified index to the designated index.
Declaration
Swift
public mutating func move(at index: Index, to newIndex: Index)Parameters
indexThe current position of the element to move. index must be a valid index of the array.
newIndexThe position at which to move the new element. index must be a valid index of the array or equal to its endIndex property.
 
- 
                  
                  
Moves an element to the designated index.
Declaration
Swift
public mutating func move(_ item: Element, to newIndex: Index)Parameters
itemAn element in the array.
newIndexThe position at which to move the new element. index must be a valid index of the array or equal to its endIndex property.
 - 
                  
                  
Moves an element to the start index.
Declaration
Swift
public mutating func moveToStart(item: Element)Parameters
itemAn element in the array.
 - 
                  
                  
Moves an element to the end index.
Declaration
Swift
public mutating func moveToEnd(item: Element)Parameters
itemAn element in the array.
 
View on GitHub
        Array Extension Reference