The range(of:options:range:locale:) method of StringProtocol does not accept a
partial range as search range. Example (Xcode 9, Swift 4):
let str = "foo"
let pos = str.startIndex
let r = str.range(of: "f", range: pos...)
// error: cannot convert value of type 'PartialRangeFrom<String.Index>'
// to expected argument type 'Range<String.Index>?'
Is that because it is an NSString method imported to Swift? Would it make sense
to file an enhancement request?
Regards, Martin
_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users