mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 21:27:57 +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 param : String?
|
||||||
var optrange : Range<Int>
|
var optrange : Range<Int>
|
||||||
if let eq = arg.range(of: "=") {
|
if let eq = arg.range(of: "=") {
|
||||||
opt = arg.substring(to: eq.lowerBound)
|
opt = String(arg[..<eq.lowerBound])
|
||||||
param = arg.substring(from: eq.upperBound)
|
param = String(arg[eq.upperBound...])
|
||||||
optrange = 0 ..< 1
|
optrange = 0 ..< 1
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user