// Substring
func substring(_ start: Int, end: Int) -> String {
return self.substring(with: Range(self.characters.index(self.startIndex, offsetBy: start) ..< self.characters.index(self.startIndex, offsetBy: end)))
}
Getting the below error in that return statement after updating Xcode to 10.0. Let me know how can I show the return statement according to latest swift version.
Cannot invoke initializer for type 'Range<_>' with an argument list of type '(Range)'