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 7ff3ecf commit d8f25beCopy full SHA for d8f25be
stdlib/public/core/StringUTF16View.swift
@@ -146,8 +146,7 @@ extension String.UTF16View: BidirectionalCollection {
146
// For a BMP scalar (1-3 UTF-8 code units), advance past it. For a non-BMP
147
// scalar, use a transcoded offset first.
148
149
- // TODO: do the ugly if non-transcoded make sure to scalar align thing...
150
- // Also, can we just jump ahead 4 is transcoded is 1?
+ // TODO: If transcoded is 1, can we just skip ahead 4?
151
152
let idx = _utf16AlignNativeIndex(idx)
153
let len = _guts.fastUTF8ScalarLength(startingAt: idx._encodedOffset)
0 commit comments