Array
public extension Array
public extension Array where Element: Equatable
public extension Array where Element == Int
public extension Array where Element == NSAttributedString
-
Returns the element in the given index. Returns nil if index is invalid.
Declaration
Swift
func get(_ index: Index) -> Element?Parameters
indexArray index
Return Value
Array element
-
Pairs an element and next element in the array
Declaration
Swift
var pairs: AnySequence<(Element, Element?)> { get }
-
Checks if the array is not empty.
Declaration
Swift
var isNotEmpty: Bool { get }
-
Removes given element if it is in this array. Otherwise it does nothing.
Declaration
Swift
mutating func remove(element: Element)
-
Increments value at index by given value. It is thread-unsafe.
Declaration
Swift
mutating func increment(at index: Index, by: Element = 1) -
Decrements value at index by given value. It is thread-unsafe.
Declaration
Swift
mutating func decrement(at index: Index, by: Element = 1)
-
Join elements with a separator in a NSAttributedString
Declaration
Swift
func joined(separator: Element) -> ElementParameters
separatorCombiner element
Return Value
Joined elements in the NSAttributedString
View on GitHub
Array Extension Reference