Skip to content

Commit 563d6c2

Browse files
committed
Remove String.Index evils
1 parent 1f99047 commit 563d6c2

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

Sources/_StringProcessing/Unicode/NecessaryEvils.swift

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,3 @@ extension UTF16 {
8888
(UInt32(lead & 0x03ff) &<< 10 | UInt32(trail & 0x03ff)))
8989
}
9090
}
91-
92-
extension String.Index {
93-
internal var _encodedOffset: Int {
94-
// The encoded offset is found in the top 48 bits.
95-
Int(unsafeBitCast(self, to: UInt64.self) >> 16)
96-
}
97-
98-
internal init(_encodedOffset offset: Int) {
99-
self = unsafeBitCast(offset << 16, to: Self.self)
100-
}
101-
}

0 commit comments

Comments
 (0)