mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
stdlib: More SE-0193 updates
This commit is contained in:
@@ -436,7 +436,6 @@ extension StringProtocol where Index == String.Index {
|
||||
// self can be a Substring so we need to subtract/add this offset when
|
||||
// passing _ns to the Foundation APIs. Will be 0 if self is String.
|
||||
@inlinable
|
||||
@usableFromInline
|
||||
internal var _substringOffset: Int {
|
||||
return self.startIndex.encodedOffset
|
||||
}
|
||||
@@ -448,7 +447,6 @@ extension StringProtocol where Index == String.Index {
|
||||
}
|
||||
|
||||
@inlinable
|
||||
@usableFromInline
|
||||
internal func _toRelativeNSRange(_ r: Range<String.Index>) -> NSRange {
|
||||
return NSRange(
|
||||
location: r.lowerBound.encodedOffset - _substringOffset,
|
||||
|
||||
Reference in New Issue
Block a user