We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3d1ddf commit 3661c39Copy full SHA for 3661c39
stdlib/public/SDK/Foundation/Foundation.swift
@@ -923,6 +923,9 @@ extension NSRange {
923
length = x.count
924
}
925
926
+ // FIXME(ABI)(compiler limitation): this API should be an extension on Range.
927
+ // Can't express it now because the compiler does not support conditional
928
+ // extensions with type equality constraints.
929
public func toRange() -> Range<Int>? {
930
if location == NSNotFound { return nil }
931
return location..<(location+length)
0 commit comments