mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #3268 from natecook1000/nc-scalarindex-nocore
[stdlib] Remove _StringCore from UnicodeScalarIndex
This commit is contained in:
@@ -96,7 +96,10 @@ extension String {
|
||||
/// Return an `Index` corresponding to the given offset in our UTF-16
|
||||
/// representation.
|
||||
func _index(_ utf16Index: Int) -> Index {
|
||||
return Index(_base: String.UnicodeScalarView.Index(utf16Index, _core))
|
||||
return Index(
|
||||
_base: String.UnicodeScalarView.Index(_position: utf16Index),
|
||||
in: characters
|
||||
)
|
||||
}
|
||||
|
||||
/// Return a `Range<Index>` corresponding to the given `NSRange` of
|
||||
|
||||
Reference in New Issue
Block a user