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.
2 parents 6b33768 + 892d0a2 commit 0bdc84bCopy full SHA for 0bdc84b
stdlib/public/core/StringUTF8View.swift
@@ -191,7 +191,7 @@ extension String.UTF8View: BidirectionalCollection {
191
}
192
_precondition(result >= 0 && result <= _guts.count,
193
"String index is out of bounds")
194
- return Index(_encodedOffset: result)
+ return Index(_encodedOffset: result)._knownUTF8
195
196
197
return _foreignIndex(i, offsetBy: n, limitedBy: limit)
0 commit comments