Initial commit; substitutions can be reviewed, no further functionality implemented yet

This commit is contained in:
Deniz Duezgoeren
2019-07-09 19:39:06 +02:00
commit 860d87f446
169 changed files with 30855 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
//
// ArrayExt.swift
// SwifSoup
//
// Created by Nabil Chatbi on 05/10/16.
// Copyright © 2016 Nabil Chatbi.. All rights reserved.
//
import Foundation
extension Array where Element : Equatable {
func lastIndexOf(_ e: Element) -> Int {
for pos in (0..<self.count).reversed() {
let next = self[pos]
if (next == e) {
return pos
}
}
return -1
}
}