mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
568 B
Swift
24 lines
568 B
Swift
|
|
public extension Array where Element : CustomStringConvertible {
|
|
|
|
var prettifiedDescription: String {
|
|
return "[ " + map { $0.description }.joined(separator: ", ") + " ]"
|
|
}
|
|
}
|
|
|
|
public extension Array {
|
|
func appending(_ other: Element) -> [Element] {
|
|
var updatedArray: [Element] = self
|
|
updatedArray.append(other)
|
|
|
|
return updatedArray
|
|
}
|
|
|
|
func appending(_ other: [Element]) -> [Element] {
|
|
var updatedArray: [Element] = self
|
|
updatedArray.append(contentsOf: other)
|
|
|
|
return updatedArray
|
|
}
|
|
}
|