File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -313,7 +313,7 @@ extension String: BidirectionalCollection {
313
313
/// present!)
314
314
///
315
315
/// This method is called from inlinable `subscript` implementations in
316
- /// current and previous versions of the stdlib, wich require this contract
316
+ /// current and previous versions of the stdlib, which require this contract
317
317
/// not to be violated.
318
318
@usableFromInline
319
319
@inline ( __always)
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ extension String.UTF16View: BidirectionalCollection {
145
145
" String index is out of bounds " )
146
146
if _slowPath ( _guts. isForeign) { return _foreignIndex ( after: idx) }
147
147
if _guts. isASCII {
148
- return idx. nextEncoded. _scalarAligned. _knownUTF8 . _knownUTF16
148
+ return idx. nextEncoded. _scalarAligned. _encodingIndependent
149
149
}
150
150
151
151
// For a BMP scalar (1-3 UTF-8 code units), advance past it. For a non-BMP
@@ -173,7 +173,7 @@ extension String.UTF16View: BidirectionalCollection {
173
173
" String index is out of bounds " )
174
174
if _slowPath ( _guts. isForeign) { return _foreignIndex ( before: idx) }
175
175
if _guts. isASCII {
176
- return idx. priorEncoded. _scalarAligned. _knownUTF8 . _knownUTF16
176
+ return idx. priorEncoded. _scalarAligned. _encodingIndependent
177
177
}
178
178
179
179
if idx. transcodedOffset != 0 {
@@ -709,7 +709,7 @@ extension String.UTF16View {
709
709
if _guts. isASCII {
710
710
return Index (
711
711
_encodedOffset: offset
712
- ) . _scalarAligned. _knownUTF8 . _knownUTF16
712
+ ) . _scalarAligned. _encodingIndependent
713
713
}
714
714
715
715
guard _guts. _useBreadcrumbs ( forEncodedOffset: offset) else {
You can’t perform that action at this time.
0 commit comments