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 e877546 + 09863c6 commit 5983561Copy full SHA for 5983561
Foundation/String.swift
@@ -74,7 +74,10 @@ extension String {
74
/// Return an `Index` corresponding to the given offset in our UTF-16
75
/// representation.
76
func _index(_ utf16Index: Int) -> Index {
77
- return Index(_base: String.UnicodeScalarView.Index(utf16Index, _core))
+ return Index(
78
+ _base: String.UnicodeScalarView.Index(_position: utf16Index),
79
+ in: characters
80
+ )
81
}
82
83
/// Return a `Range<Index>` corresponding to the given `NSRange` of
0 commit comments