mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-18 12:56:29 +00:00
Fix calls to deprecated String.substring() method
This commit is contained in:
parent
7ab9bc0a10
commit
0dea727b69
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user