Fix calls to deprecated String.substring() method

This commit is contained in:
Andrew Bettison 2018-04-30 11:56:34 +09:30
parent 7ab9bc0a10
commit 0dea727b69

View File

@ -70,8 +70,8 @@ func parseOptions(_ args: inout [String], _ options: [(String, (String) -> Void)
var param : String?
var optrange : Range<Int>
if let eq = arg.range(of: "=") {
opt = arg.substring(to: eq.lowerBound)
param = arg.substring(from: eq.upperBound)
opt = String(arg[..<eq.lowerBound])
param = String(arg[eq.upperBound...])
optrange = 0 ..< 1
}
else {