-
Couldn't load subscription status.
- Fork 1.2k
Open
Description
Currently trying to do things like the following only work on Darwin:
let swiftRange = Range(range, in: string)
| `- error: initializer 'init(_:in:)' requires that 'NSRange' (aka '_NSRange') conform to 'RangeExpression'It's possible to work around this by, for example, creating the Range manually:
let start = string.utf16.index(string.startIndex, offsetBy: range.location)
let end = string.utf16.index(start, offsetBy: range.length)
let swiftRange = start ..< endBut it would be great to have full conversion support between NSRange and Swift.Range on Linux too.
Metadata
Metadata
Assignees
Labels
No labels